Automate deployments
Polling, GitHub push, or a CI gate. Choose one trigger mode.
Choose a trigger
| Mode | Behavior |
|---|---|
| Auto deploy / polling | Checks the configured branch every five minutes and deploys new revisions. |
| GitHub push | Immediate authenticated push-triggered sync, with polling fallback. |
| Actions hook | Source can sync in the background, but deployment waits for the CI hook. |
Creating a hook enables Auto deploy and selects its mode. Users need webhooks.manage and deploy.start; monitoring-token creation also needs logs.read.
Connect GitHub push
Create a GitHub webhook secret in the project and copy it once. In repository Settings → Webhooks, use the displayed payload URL, application/json, that secret and Just the push event. Portal verifies X-Hub-Signature-256, repository and branch, then fetches the current branch tip. Repeated deliveries do not create duplicate releases for the same revision.
Wait for CI
Create an Actions hook. Store its token in PORTAL_DEPLOY_TOKEN (Actions secret), and URL in PORTAL_DEPLOY_URL (Actions variable). Add this after successful checks in the existing job; replace main with the configured branch.
- name: Trigger Portal deploy
if: github.ref == 'refs/heads/main'
env:
PORTAL_DEPLOY_URL: ${{ vars.PORTAL_DEPLOY_URL }}
PORTAL_DEPLOY_TOKEN: ${{ secrets.PORTAL_DEPLOY_TOKEN }}
run: curl --fail-with-body --silent --show-error --request POST --header "Authorization: Bearer $PORTAL_DEPLOY_TOKEN" "$PORTAL_DEPLOY_URL"202 means scheduled, not deployed. The hook syncs the configured branch tip; it does not pin the deployment to the commit tested by that CI run. Inspect Portal release logs.
Disable deliberately
Disabling a GitHub hook returns to polling; turn off Auto deploy to stop all automatic deployment. Disabling an Actions hook stops deployment until another mode is selected. Removing a member does not disable project automation. Rotate or disable triggers separately. Outbound notification hooks do not trigger deployment.