github-pages-deploy-action: GitHub Pages build failed
What’s the problem?
Every time an action is triggered, I get the “Your site is having problems building: Page build failed.” error.
I tried to replace GITHUB_TOKEN: ${{ secret.GITHUB_TOKEN }} with ACCESS_TOKEN: ${{ secret.REPO_SCOPED_TOKEN }}.
Didn’t help.
I tried to add a .nojekyll file to the build.
Didn’t help.
I tried using JamesIves/github-pages-deploy-action@releases/v3.
Didn’t help.
I tried to add a .nojekyll file directly to gh-pages branch.
But,
You can safely commit these files directly into deployment branch without them being overridden after each deployment
is definitely not true. All files are erased every time.
Expected behavior
No errors will occur after deployment.
Therefore, I would appreciate any help in solving this problem.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 9
- Comments: 21 (8 by maintainers)
Commits related to this issue
- Try lock checkout to a version Ref: https://github.com/JamesIves/github-pages-deploy-action/issues/48 — committed to hmcts/hmcts.github.io by deleted user 4 years ago
- Try lock checkout to a version (#23) Ref: https://github.com/JamesIves/github-pages-deploy-action/issues/48 — committed to hmcts/hmcts.github.io by deleted user 4 years ago
I’ve noticed this too and I’ve been holding back on releasing the new version because of it. I’ve emailed GitHub support about it with a very vague response from them. It seems like something has changed this last week, because previously the error was only caused if you are using a GitHub token, but they told me it’s because a human didn’t trigger the build even though an access token with a very greedy permission scope was used.
I’ve also posted about it here: https://github.community/t5/GitHub-Actions/Github-action-not-triggering-gh-pages-upon-push/m-p/38065/highlight/true#M3210 and here: https://github.community/t5/GitHub-Pages/Cannot-Build-Page/m-p/37618#M2324 but have yet to receive any actionable response.
@tcbyrd - If you’re available are you able to look into this? I have a test repo with the issue: https://github.com/JamesIves/doughnut-generator
And yes, I forgot to mention, if I make any changes to the
gh-pagesbranch after deployment, the error disappears.Try changing
GITHUB_TOKENout for a personal access token in the deploy step and it should work.Just got word back from GitHub support. Essentially what’s happening here is that the
GITHUB_TOKENis being persisted by another action, causing the failure when it gets to the deploy step because of the existence of aGITHUB_TOKEN.Update the
actions/checkoutstep in your config to point tov1and this issue should be resolved.Just tested it and it worked for me. Please let me know if you have similar luck, I’ve updated the action config examples in the README if you want to take a look there.
With that being said I’m going to push up
v3today.This seems to be a problem for all gh-pages deploy actions. Switching to master branch in settings/Github_Pages and then switching back to gh-pages cause it to deploy correctly
This does work. Let’s hope
GITHUB_TOKENgets a fix soonI also got depressed by this problem…, I found something special, the first time you run the action in v2/v3, the page will be built successfully, but if u update sth and push, when the action goes there will be one more workflow ‘github pages’, although it shows success the page still failed in building.