Scan after deploy
GitLab CI/CD
A .gitlab-ci.yml job that starts a scan after deploy.
Integration guide
Add one step to your GitHub Actions workflow and Rookflare scans your website right after every successful deploy, with the commit SHA attached.
Overview
Setup
Step 1
Open the website, go to the Settings tab and select “Create deploy hook” in the “Scan after deploy” card. Copy the token right away: this is the only time Rookflare shows it in full. The card keeps the endpoint and the last four characters of the token.
Step 2
In GitHub, open the repository’s Settings → Secrets and variables → Actions and add a new repository secret named ROOKFLARE_DEPLOY_TOKEN with the token as its value. If the deploy job uses a GitHub environment such as production, you can store it as an environment secret there instead, so only jobs for that environment can read it.
Step 3
Paste this step at the end of the job that deploys. “if: success()” keeps it from running when the deploy fails, and curl’s -f flag fails the step when Rookflare rejects the call.
Sample endpoint and placeholder token. The dashboard fills in yours.
Step 4
In a full workflow it sits after the deploy step of the same job. Replace the deploy step with yours. Keep it in the same job: a separate job would need “needs: deploy” to wait for the deploy to finish.
Sample endpoint and placeholder token. The dashboard fills in yours.
Step 5
Push a commit to main (or the branch your workflow deploys) and open the run in the Actions tab. The “Scan with Rookflare after deploy” step should finish green. In Rookflare, the card’s “Last used” shows the time of the call and the website’s Scan history lists a scan with the trigger “After deploy”.
Troubleshooting
An earlier step in the job failed, so “if: success()” skipped the call. That is intended: Rookflare should not scan a deploy that did not happen. Fix the deploy and push again.
GitHub does not pass repository secrets to workflows triggered from forks, so the header has no token and Rookflare answers 401. Run the step only in the workflow that deploys from your own branch.
Events created with the built-in GITHUB_TOKEN do not start new workflow runs, except workflow_dispatch and repository_dispatch. Put the Rookflare step in the workflow that deploys, or trigger the follow-up workflow with workflow_run.
401 means a wrong, rotated or revoked token, 402 a plan or daily limit, 409 an unverified or paused website and 429 more than 30 calls a minute. The cURL guide explains each answer and what to do.
In your deploy tool’s secret store, never in the repository. The token can only start scans of one website, and you can rotate or revoke it on the website’s Settings tab at any time; the old token stops working right away.
Yes, if the host reports deployments to GitHub. A workflow on the deployment_status event runs when a deployment status is created; give the job “if: github.event.deployment_status.state == 'success'” and compare github.event.deployment.environment with your production environment name. GITHUB_SHA is then the commit that was deployed.
No. Rookflare scans the pages of the website you added, which is your live site. Add the step only to the workflow that deploys to production; a preview environment has a different address that Rookflare does not monitor.
In the job that deploys the app behind the website you monitor. Each Rookflare website has its own token, so a second monitored site gets its own secret, for example ROOKFLARE_DEPLOY_TOKEN_SHOP, and its own step in that app’s deploy job.
Add your address, pick the pages and approve the first scan as your baseline.
Plans start at €19 per month. Prices are provisional.