Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 3
Message 21 of 25

Re: Github action not triggering gh-pages upon push

Yes. Deployment key option is a current workaround better than a personal access token (PAT has too large scope). I hope that GitHub Pages build event can be triggered by GITHUB_TOKEN on a public repository. (GITHUB_TOKEN can trigger the event on a private repository.)

Copilot Lvl 3
Message 22 of 25

Re: Github action not triggering gh-pages upon push

Even the Personal Access Token seems to not trigger the update these days.

Copilot Lvl 3
Message 23 of 25

Re: Github action not triggering gh-pages upon push

Correct, just tried today with my personal token and the push is not trigering the build. I had to request a build manually using the GH API:

      - name: Request Github Pages build job
        run: >-
          curl -L -X POST 
          -H "Content-Type: application/json"
          -H "Authorization: token ${{ secrets.GH_PAT}}"
          "https://api.github.com/repos/${{ github.repository }}/pages/builds"
Copilot Lvl 2
Message 24 of 25

Re: Github action not triggering gh-pages upon push

@Xotl - when you manually used the GH API to request the pages build, which permission(s) did your personal access token require to work?

Copilot Lvl 3
Message 25 of 25

Re: Github action not triggering gh-pages upon push

@Bwvolleyball, I used tpublic_repo scope, but if your repo is a private repo you might need the whole repo scope.