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

Switches credentials to use GITHUB_TOKEN #13

Merged
merged 28 commits into from Sep 26, 2019
Merged

Switches credentials to use GITHUB_TOKEN #13

merged 28 commits into from Sep 26, 2019

Conversation

JamesIves
Copy link
Owner

@JamesIves JamesIves commented Aug 22, 2019

Description

Provide a description of what your changes do.

According to @tcbyrd this should work now: maxheld83/ghpages#18 (comment)

This pull request makes the required changes to switch the action to use the GITHUB_TOKEN credentials provided with GitHub actions.

The access token will still work, but it's no longer required. Also removed the ability to customize the commit name/email which will allow the commits to be signed correctly using the push event payload.

Testing Instructions

Give us step by step instructions on how to test your changes.

  • You can test the action by referencing the ghtoken branch of the action.
  • It should deploy on push when using the GITHUB_TOKEN secret.

Additional Notes

Anything else that will help us test the pull request.

Closes #5

@JamesIves JamesIves added the feature request ✨ New feature or request label Aug 22, 2019
@nickmccurdy
Copy link
Contributor

I tried this out in a new project with no secrets or access tokens configured (but using @ghtoken for the branch), and I'm still getting You must provide the action with either a Personal Access Token or the GitHub Token secret in order to deploy.: https://github.com/nickmccurdy/manuals/runs/215402909

@JamesIves
Copy link
Owner Author

JamesIves commented Sep 8, 2019

@nickmccurdy The description of this PR is slightly misleading, I apologize about that. You still require either a GitHub token or an Access Token for this to work. The biggest difference is that the GitHub token is a built in secret on the repository, which means you don't need to manually generate credentials in order for the deployment

This PR is still blocked however, as the GitHub token still isn't enough for the action to trigger a pages build. You can track the progress of this in issue #5.

@JamesIves JamesIves added planned 🕘 This feature is planned. researching 📒 Currently researching potential fixes. labels Sep 8, 2019
@nickmccurdy
Copy link
Contributor

Does this mean I can use the built in GITHUB_TOKEN if I explicitly configure it in the workflow’s access tokens, or would that still not work because of the bug?

@JamesIves
Copy link
Owner Author

That’s the intent, but it will not work right now. The readme was updated along with the PR but it won’t be valid until it merges.

@tcbyrd
Copy link

tcbyrd commented Sep 13, 2019

@JamesIves I think I tracked down the problem. If the push to the pages branch only ever comes from Actions (as in, no human has ever edited it manually), the page deployment won't kick off. Once a branch is edited by a user, subsequent pushes from Actions should kick off the deployment. Could you confirm if this is what you're seeing? If you can edit one of the files in your Pages branch in the browser and that should kick off a deployment. Then after that I suspect the GITHUB_TOKEN method will work. This is just a workaround for now and I'm working on a PR to fix it, I just want to confirm if this is the problem you're seeing.

@JamesIves
Copy link
Owner Author

JamesIves commented Sep 23, 2019

@tcbyrd That's correct - I reported something similar to GitHub support a couple of months ago. If it's helpful I can grant GitHub staff access to my test repo if you'd like to try it out yourself. Lemme know!

@JamesIves JamesIves merged commit dc639e5 into master Sep 26, 2019
@JamesIves JamesIves deleted the ghtoken branch September 26, 2019 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request ✨ New feature or request planned 🕘 This feature is planned. researching 📒 Currently researching potential fixes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use GITHUB_TOKEN instead of ACCESS_TOKEN
3 participants