Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteiTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
A workflow can use GITHUB_TOKEN to deploy a GitHub Pages artifact, but a commit pushed with that token will not trigger a Pages build. These are different operations: the token-trigger restriction applies when a workflow pushes a commit and expects that push to start another build; it does not rule out GitHub’s custom artifact-based Pages deployment.
Why a workflow-pushed commit does not rebuild Pages
GitHub documents that commits pushed by a GitHub Actions workflow using GITHUB_TOKEN do not trigger a GitHub Pages build. This affects workflows that generate files, commit them to a branch, and expect the resulting push event to publish the site. The commit can succeed while no Pages build starts.
This is an event-trigger limitation, not proof that the token cannot be used for any Pages deployment. GitHub describes two publishing approaches: publish from a branch, or use a custom GitHub Actions workflow. GitHub’s publishing-source documentation explains the choices, and its Pages creation guidance documents the token-pushed-commit behavior.
Choose the publishing flow that matches your build
| Approach | Where published files come from | How publishing proceeds |
|---|---|---|
| Branch source | The configured branch’s root or /docs folder |
Changes pushed to the selected source are published. A commit pushed by a workflow using GITHUB_TOKEN does not trigger a Pages build. |
| Custom Actions workflow | A Pages artifact produced by the workflow | The workflow builds the site as needed, uploads the artifact, and deploys it with actions/deploy-pages. |
The branch option suits a site whose published files already live in the selected source location. A custom workflow suits a site that needs a build step before publication. For the latter, the expected sequence is build, upload the Pages artifact with actions/upload-pages-artifact, then deploy it with actions/deploy-pages. GitHub documents this pattern in Using custom workflows with GitHub Pages.
#1 Best Overall
Can GITHUB_TOKEN deploy a Pages site?
Yes, the documented custom-workflow deployment path can use the workflow’s GitHub token permissions to deploy a Pages artifact. The deployment job needs at least pages: write and id-token: write, and it should depend on the job that built and uploaded the artifact. Those permissions authorize the artifact deployment flow; they do not make a later commit pushed with GITHUB_TOKEN trigger a separate Pages build.
GITHUB_TOKEN is a repository-scoped GitHub App installation access token created for each workflow job. GitHub recommends granting it only the permissions the job needs. See the official GITHUB_TOKEN overview and authentication guidance.
Diagnose the failure from the source setting and run
- Check the Pages source. In the repository’s Pages settings, determine whether publishing is configured for a branch or for GitHub Actions. The correct fix depends on that choice.
- For branch publishing, check the configured path. Confirm the selected branch and either its root or
/docsfolder exist and contain the expected site files. A missing/docssource can produce a Pages build error. - Check what event was supposed to start publication. If a workflow committed generated files using
GITHUB_TOKENand expected that push to start another Pages build, that trigger will not occur. - For a custom workflow, follow the artifact chain. Confirm the build output is uploaded as a Pages artifact, the deploy action runs after the build job, and the deployment job has both
pages: writeandid-token: write. - Read the exact error and the Actions run. The token-trigger rule does not establish that every Pages error is a token error. The error text and run logs are needed to distinguish a missing source, failed build, missing artifact, permission issue, or another problem.
When another credential may be needed
Use a different credential only if the workflow must perform an operation that GITHUB_TOKEN cannot authorize. GitHub documents a GitHub App installation token or a personal access token stored as a repository secret for operations requiring unavailable permissions. That is not an automatic requirement for the standard Pages artifact deployment documented above. Review GitHub’s GITHUB_TOKEN authentication guidance before changing credentials.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Quick Recap
Best Value
Rank #4
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

