| name | apify-ci-integration |
| description | Configure CI/CD pipelines for Apify Actor builds and deployments.
Use when automating Actor deployment via GitHub Actions, running
integration tests against the live Apify API, or building CI/CD for
scrapers that push to the Apify platform.
Trigger with "apify CI", "apify GitHub Actions", "apify automated deploy",
"CI apify", "apify pipeline", "auto deploy actor".
|
| allowed-tools | Write, Bash(gh:*), Bash(npm:*) |
| version | 1.5.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","scraping","automation","apify"] |
| compatibility | Designed for Claude Code |
Apify CI Integration
Overview
Automate Apify Actor builds, tests, and deployments using GitHub Actions —
test-on-PR, deploy-on-merge, live-API integration testing, and Docker build
verification. Three workflow files do the work (test, deploy, verify-build);
full copy-paste-ready definitions live in
references/workflows.md.
Prerequisites
- GitHub repository with Actions enabled
- Apify API token stored as a GitHub secret
- Actor code in the repository
Authentication
CI authenticates to Apify with a personal API token, never a hard-coded
credential:
- Store the token as a GitHub Actions secret (
gh secret set APIFY_TOKEN),
and expose it to a job only via env: APIFY_TOKEN: ${{ secrets.APIFY_TOKEN }}.
- The Apify CLI reads it as
apify login --token $APIFY_TOKEN; the REST API and
apify-client read it from the APIFY_TOKEN environment variable.
- Use separate
APIFY_TOKEN_TEST / APIFY_TOKEN_PROD secrets so integration
runs never touch production data. Get tokens from Apify Console → Settings →
Integrations.
Instructions
Step 1: Configure GitHub Secrets
gh secret set APIFY_TOKEN --body "apify_api_YOUR_CI_TOKEN"
gh secret set APIFY_TOKEN_TEST --body "apify_api_test_token"
gh secret set APIFY_TOKEN_PROD --body "apify_api_prod_token"
Step 2: Create the test workflow
Add .github/workflows/apify-test.yml with two jobs — unit-tests on every PR
and integration-tests gated to push (merge) events. The integration job
proves connectivity before running tests:
- name: Verify Apify connection
run: |
curl -sf -H "Authorization: Bearer $APIFY_TOKEN" \
https://api.apify.com/v2/users/me | jq '.data.username'