Coder Social home page Coder Social logo

Comments (19)

JamesIves avatar JamesIves commented on May 12, 2024 8

I’d love to, and originally the action was, but unfortunately there’s an issue with the Github secret provided with actions that prevents Github Pages from rebuilding your site with it, that means that you’ll be able to commit to the branch, but it will never update. It works for private repostitories, but not public ones.

I’m keeping an eye on the situation and will test this again when actions leaves beta. For now I’d suggest limiting the permissions on the PAT you create if you’d like to use the action!

from github-pages-deploy-action.

peaceiris avatar peaceiris commented on May 12, 2024 5

@dhimmel
FYI. https://github.community/t5/GitHub-Actions/Github-action-not-triggering-gh-pages-upon-push/m-p/31266/highlight/true#M743
GitHub team is focusing this issue.

from github-pages-deploy-action.

peaceiris avatar peaceiris commented on May 12, 2024 3

FYI. peaceiris/actions-gh-pages#9 (comment)

Community Manager said:

The GITHUB_TOKEN that is provided as a part of GitHub Actions doesn't have authorization to create any successive events, such as GitHub Pages builds. So while you can push to the gh-pages branch using the GITHUB_TOKEN, it won't spawn a GitHub Pages build. You'll need to create a personal access token and supply it to your GitHub Action as a secret.

peaceiris/actions-gh-pages#9 (comment)

Yes, it seems like that's not a bug but a normal behavior in the context of the security rule imposed in Github Actions which is "A workflow can not trigger another workflow".

from github-pages-deploy-action.

JamesIves avatar JamesIves commented on May 12, 2024 2

Following up on this @gerardabello - here's the response I've received from GitHub's developer support.

After speaking with the team about this, they let me know that server-to-server requests won't kick off a page build, whether it's creating a commit or explicitly requesting a page build.

As you've observed, user-to-user server requests (using a personal access token or an OAuth token) can build a Pages project via push or requesting a page build because they're linked to a specific user account.

I see how it would be useful to open this functionality to GitHub Actions, so I've let the team know about this internally.

I've also provided GitHub with some additional information about the private repository behavior I mentioned in my initial post. I'll let you know if I hear anything more.

from github-pages-deploy-action.

JamesIves avatar JamesIves commented on May 12, 2024 2

Still no updates from GitHub on this. I've emailed them twice now with no reply.

from github-pages-deploy-action.

dhimmel avatar dhimmel commented on May 12, 2024 2

Quite the limitation that a github action commit cannot trigger another action. Using a personal access token to deploy a single repository is bad practice and the fact that actions require this for something as basic as deploying to gh-pages is evidence that workflows should be able to trigger workflows. Or at least that gh-pages commits should be exempt from this limitation.

Let us know if there are any workarounds that support using GITHUB_TOKEN for authentication.

from github-pages-deploy-action.

JamesIves avatar JamesIves commented on May 12, 2024 1

I've recently emailed GitHub support, I'll let you know if I hear back!

from github-pages-deploy-action.

JamesIves avatar JamesIves commented on May 12, 2024 1

I'll keep an eye on this. Doesn't seem possible just yet.

from github-pages-deploy-action.

gerardabello avatar gerardabello commented on May 12, 2024 1

@JamesIves thanks for researching this. Ping me if you need any help.

from github-pages-deploy-action.

JamesIves avatar JamesIves commented on May 12, 2024 1

The option for using a GitHub token vs an access token is already available in v2 and v3. I'm going to close this issue, please follow this thread to stay up-to-date: https://github.community/t5/GitHub-Actions/Github-action-not-triggering-gh-pages-upon-push/m-p/31266/highlight/true#M743

from github-pages-deploy-action.

alex-page avatar alex-page commented on May 12, 2024

Some additional context here: maxheld83/ghpages#1

from github-pages-deploy-action.

JamesIves avatar JamesIves commented on May 12, 2024

Thanks @alex-page!

from github-pages-deploy-action.

alex-page avatar alex-page commented on May 12, 2024

Oops that issue only has a bit of context, check the PR out maxheld83/ghpages#18

from github-pages-deploy-action.

JamesIves avatar JamesIves commented on May 12, 2024

Hoping to have a fix for this today.

from github-pages-deploy-action.

JamesIves avatar JamesIves commented on May 12, 2024

I've got a PR open for this, but the issue still appears to be present: #13

from github-pages-deploy-action.

JamesIves avatar JamesIves commented on May 12, 2024

#13 (comment)

^ Cross posting this here. I'm going to merge in this feature/PR and point to this issue.

from github-pages-deploy-action.

shilangyu avatar shilangyu commented on May 12, 2024

It seems github has ditched fixing the GITHUB_TOKEN? It's sad because it would be much more convenient :/

from github-pages-deploy-action.

dhimmel avatar dhimmel commented on May 12, 2024

It seems github has ditched fixing the GITHUB_TOKEN?

Has there been a change in the last few days? Deploying to a branch that then triggers a GitHub Pages build using GITHUB_TOKEN has been working for several months, except for the first deployment as described here. Is this no longer the case?

from github-pages-deploy-action.

peaceiris avatar peaceiris commented on May 12, 2024

It works well.

Log: https://github.com/peaceiris/actions-gh-pages/commits/gh-pages

peaceiris/actions-gh-pages: GitHub Actions for GitHub Pages

Screen Shot 2020-05-02 at 2 23 14

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.