Giter Club home page Giter Club logo

Comments (21)

JamesIves avatar JamesIves commented on May 9, 2024 6

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.

Oh interesting - we'll dig into this more and followup if we have more questions.

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

from github-pages-deploy-action.

freearhey avatar freearhey commented on May 9, 2024 5

And yes, I forgot to mention, if I make any changes to the gh-pages branch after deployment, the error disappears.

from github-pages-deploy-action.

shilangyu avatar shilangyu commented on May 9, 2024 2

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

from github-pages-deploy-action.

JamesIves avatar JamesIves commented on May 9, 2024 2

Just got word back from GitHub support. Essentially what's happening here is that the GITHUB_TOKEN is being persisted by another action, causing the failure when it gets to the deploy step because of the existence of a GITHUB_TOKEN.

Update the actions/checkout step in your config to point to v1 and this issue should be resolved.

    steps:
    - name: Checkout
      uses: actions/checkout@v1

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 v3 today.

from github-pages-deploy-action.

JamesIves avatar JamesIves commented on May 9, 2024 2

I used v2 and releases/v3 of github-pages-deploy-action with checkout@v1 to no avail. Getting the same error 'GitHub Pages build failed'. Heres an example project. Its hosted on shilangyu.dev/actions-testing and you can see the content does not match the gh-pages branch.

Try changing GITHUB_TOKEN out for a personal access token in the deploy step and it should work.

from github-pages-deploy-action.

linbudu599 avatar linbudu599 commented on May 9, 2024 1

I 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.
image

from github-pages-deploy-action.

shilangyu avatar shilangyu commented on May 9, 2024 1

Try changing GITHUB_TOKEN out for a personal access token in the deploy step and it should work.

This does work. Let's hope GITHUB_TOKEN gets a fix soon

from github-pages-deploy-action.

JamesIves avatar JamesIves commented on May 9, 2024

Also @freearhey some of the issues you're referring to such as the CNAME and .nojekyll items are only relevant to v3, which hasn't been released yet. If you're using v2 you need to follow the steps in that README.

from github-pages-deploy-action.

freearhey avatar freearhey commented on May 9, 2024

@JamesIves I brought the text from the docs of v3 precisely because I tried to use v3 in this case. At that time, I thought that the problem could be precisely that .nojekyll is recreated every time from scratch. When using v2, of course I was guided by the documentation for v2.

from github-pages-deploy-action.

JamesIves avatar JamesIves commented on May 9, 2024

@JamesIves I brought the text from the docs of v3 precisely because I tried to use v3 in this case. At that time, I thought that the problem could be precisely that .nojekyll is recreated every time from scratch. When using v2, of course I was guided by the documentation for v2.

Please follow the instructions here to try the beta of v3 - https://github.com/JamesIves/github-pages-deploy-action/tree/releases/v3-beta

If you're still experiencing the issue you mentioned with the CNAME files please open a new issue. I'd like to keep this on-topic for the deployment issue.

from github-pages-deploy-action.

Fndroid avatar Fndroid commented on May 9, 2024

Same issue. All actions run passed but Github page deploy failed.
image

from github-pages-deploy-action.

shilangyu avatar shilangyu commented on May 9, 2024

I used v2 and releases/v3 of github-pages-deploy-action with checkout@v1 to no avail. Getting the same error 'GitHub Pages build failed'. Heres an example project. Its hosted on shilangyu.dev/actions-testing and you can see the content does not match the gh-pages branch.

from github-pages-deploy-action.

freearhey avatar freearhey commented on May 9, 2024

Changing the actions/checkout version to v1 really helped. I also had to roll back to JamesIves/github-pages-deploy-action@master because v3 currently causes a 'Cannot read property 'name' of undefined' error. But the main problem is solved, so thank you anyway!

from github-pages-deploy-action.

JamesIves avatar JamesIves commented on May 9, 2024

@freearhey Can you open another issue with the v3 issue with the logs? Would super appreciate it!

from github-pages-deploy-action.

JamesIves avatar JamesIves commented on May 9, 2024

From what I understand it's in the works on GitHubs end, but not ready yet. This action just supports it for when it does work. I pre-maturely added it because people kept trying it anyway,.

from github-pages-deploy-action.

leoglobant avatar leoglobant commented on May 9, 2024

@JamesIves I'm getting this issue, switching to v1 didn't help. I'm already setting with: token with a PAT. I'm using Github Enterprise. Any clue?

from github-pages-deploy-action.

JamesIves avatar JamesIves commented on May 9, 2024

@JamesIves I'm getting this issue, switching to v1 didn't help. I'm already setting with: token with a PAT. I'm using Github Enterprise. Any clue?

This is a very old issue. Please create a new issue or discussion that outlines your problem and I'll do my best to support.

from github-pages-deploy-action.

pavelkornev avatar pavelkornev commented on May 9, 2024

@JamesIves I'm facing the same issue as @leoglobant... using GitHub Enterprise, once deployed by this GH Action β€” build fails, if I deploy the same files manually β€” everything works.

I do have

permissions:
  contents: write

in the workflow file and using checkout@v2 and github-pages-deploy-action@v4

And I see that files are deployed/committed properly to gh-pages branch. I don't understand what is the root cause of such GitHub behaviour. Any suggestions?

from github-pages-deploy-action.

pavelkornev avatar pavelkornev commented on May 9, 2024

Switching to use Token instead of permissions in the workflow file helped me to solve the issue (maybe update documentation?).

from github-pages-deploy-action.

dayo09 avatar dayo09 commented on May 9, 2024

Switching to use Token instead of permissions in the workflow file helped me to solve the issue (maybe update documentation?).

This issue helped me a lot :-D Thanks.

To be specific, I registered a PAT of maintainer account and passed it as github-pages-deploy-action's token, and it works now.

In my case, I hadn't set with: token: at all, but my workflow worked well. It's because the action's always triggered by maintainers, so it was given the default GITHUB_TOKEN enough to push to gh-pages.
However, for some reason, it seems not to have enough permission to deploy github pages.
So I set PAT of maintainer account as github-pages-deploy-action's token and all is fine now.

Reference:

https://docs.github.com/en/[email protected]/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#troubleshooting-publishing-from-a-branch

Who can use this feature

People with admin or maintainer permissions for a repository can configure a publishing source for a GitHub Pages site.

Note: If your site has not published automatically, make sure someone with admin permissions and a verified email address has pushed to the publishing source.

from github-pages-deploy-action.

IdiosApps avatar IdiosApps commented on May 9, 2024

For me, on Checkout v1 / v3 in GitHub Enterprise, setting write permissions as the readme suggested didn't help - still get Your site is having problems building: Page build failed.

Switching GH Pages to main and back to gh-pages fixes the error, and the website looks good (temporary manual solution, to prove the files are correct).

I will try the token suggestion above.

from github-pages-deploy-action.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.