Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GITHUB_TOKEN does not trigger GitHub Pages updates #247

Closed
umarcor opened this issue Dec 9, 2019 · 4 comments
Closed

GITHUB_TOKEN does not trigger GitHub Pages updates #247

umarcor opened this issue Dec 9, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@umarcor
Copy link

umarcor commented Dec 9, 2019

I'm trying to use the default GITHUB_TOKEN to push updated docs to branch gh-pages. While the branch is properly updated, GitHub services seem not to detect those pushes as valid. As a result, even if sources are properly published, the web site is never updated.

For example:

To Reproduce

    - env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      run: |
        cd <path/to/built/site/content>
        touch .nojekyll
        git init
        git add .
        git config --local user.email "push@gha"
        git config --local user.name "GHA"
        git commit -a -m "update ${{ github.sha }}"
        git remote add origin https://x-access-token:[email protected]/$GITHUB_REPOSITORY
        git push -u origin +HEAD:gh-pages

Expected behavior

Commits pushed with the GITHUB_TOKEN should be as valid as those published by admins of the repo.

@umarcor umarcor added the bug Something isn't working label Dec 9, 2019
@softprops
Copy link

I don't think this relates to the toolkit sdk so much as it does the provisioned runtime environment in GitHub actions. The following gh pages action links to working alternatives as well as a tracking issue for the token permission https://github.com/peaceiris/actions-gh-pages/blob/master/README.md#%EF%B8%8F-github_token

@umarcor
Copy link
Author

umarcor commented Dec 9, 2019

I don't think this relates to the toolkit sdk so much as it does the provisioned runtime environment in GitHub actions.

Unfortunately, there seems not to exist a best repo to report this:

The following gh pages action links to working alternatives as well as a tracking issue for the token permission

I didn't find any working alternative for my use case, since this seems to require a fix by GitHub. I am already using Deployment keys for other use cases, and it works ok. But I'm precisely trying to avoid the burden of creating and managing deployment keys for each GitHub Pages site.

Anyway, thanks for the references. I will follow https://github.community/t5/GitHub-Actions/Github-action-not-triggering-gh-pages-upon-push/td-p/26869

@bryanmacfarlane
Copy link
Member

Github community is the best place to request / report this. Not an issue that the toolkit can address.

@qoomon
Copy link

qoomon commented Jun 2, 2024

@umarcor May be my action could be a solution for your problem https://github.com/qoomon/actions--access-token
Token generated by this action should trigger workflows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants