Hootsuite CI Integration
Instructions
GitHub Actions Workflow
name: Hootsuite Integration
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: '20', cache: 'npm' }
- run: npm ci
- run: npm test # Mocked tests, no API access needed
integration:
if: github.ref == 'refs/heads/main'
needs: test
runs-on: ubuntu-latest
env:
HOOTSUITE_CLIENT_ID: ${{ secrets.HOOTSUITE_CLIENT_ID }}
HOOTSUITE_CLIENT_SECRET: ${{ secrets.HOOTSUITE_CLIENT_SECRET }}
HOOTSUITE_REFRESH_TOKEN: ${{ secrets.HOOTSUITE_REFRESH_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: '20', cache: 'npm' }
- run: npm ci
- name: Refresh token and test API
run: node scripts/test-api-connection.js
Configure Secrets
gh secret set HOOTSUITE_CLIENT_ID --body "client_id"
gh secret set HOOTSUITE_CLIENT_SECRET --body "client_secret"
gh secret set HOOTSUITE_REFRESH_TOKEN --body "refresh_token"
Resources
Next Steps
For deployment, see hootsuite-deploy-integration.