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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use latest Jekyll-action configuration #8579

Merged
merged 2 commits into from Mar 27, 2021
Merged

Conversation

jondarrer
Copy link
Contributor

This is a 馃敠 documentation change.

Summary

The most recent version of the jekyll-action GitHub Action, 2.1.0, has changed the environment variable JEKYLL_PAT to a parameter called token.

https://github.com/marketplace/actions/jekyll-actions#deprecation

Adding this change should make it easier for anyone setting up the GitHub Action. Using the latest version of the action brings it into line with current documentation.

Context

The most recent version of the jekyll-action GitHub Action, 2.1.0, has changed the _environment variable_ `JEKYLL_PAT` to a _parameter_ called `token`.

https://github.com/marketplace/actions/jekyll-actions#deprecation

Adding this change should make it easier for anyone setting up the GitHub Action. Using the latest version of the action brings it into line with current documentation.
@MichaelCurrin
Copy link
Contributor

Hi. Thanks for picking up the deprecation.

When I wrote this article, the GH token approach was no supported.

Can you make additional changes to the same page? There is a bullet point mention of JEKYLL_PAT which can come out. And the second time it is mentioned is in the Permissions section - that entire section can be removed now since one no longer needs to generate a custom token. GH generates the GH_TOKEN value automatically.

Another benefit of GH_TOKEN is its security - it scoped to one repo only while JEKYLL_PAT gives access to edit all repos of a user.
Not that you have to mention that, but just for context.

Copy link
Contributor

@MichaelCurrin MichaelCurrin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove all references to JEKYLL_PAT and creating a custom token.

When it comes to use GH_TOKEN, make sure to add a note around that saying one must copy and paste code as is (ie don't substitute to your own value in there). And mention that GH Actions will generate and use GH_TOKEN on a workflow run, so one does not need to generate it manually.

@MichaelCurrin
Copy link
Contributor

MichaelCurrin commented Feb 13, 2021

By the way, I just made the update in the demo repo which is linked in the tutorial

It uses this new token flow.

https://github.com/MichaelCurrin/jekyll-actions-quickstart/blob/v1.3.0/.github/workflows/jekyll.yml

@jdvp
Copy link

jdvp commented Mar 20, 2021

Yeah, I think the entire "Providing Permissions" section can be removed. It might also be good to update again to the latest version (2.2.0)

For me, it also didn't work unless I specifically gave the target branch too, but unsure if anyone else has had that problem. Might want to include it as well.

  - uses: helaili/jekyll-action@2.2.0
    with:
      token: ${{ secrets.GITHUB_TOKEN }}
      target_branch: 'gh-pages'

@DirtyF
Copy link
Member

DirtyF commented Mar 27, 2021

@jekyll: merge +docs

@jekyllbot jekyllbot merged commit 91c0f2a into jekyll:master Mar 27, 2021
jekyllbot added a commit that referenced this pull request Mar 27, 2021
github-actions bot pushed a commit that referenced this pull request Mar 27, 2021
Jonathan Darrer: Use latest Jekyll-action configuration (#8579)

Merge pull request 8579
@jekyll jekyll locked and limited conversation to collaborators Mar 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants