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

docs(deployment): add GITHUB_TOKEN permission info... #9373

Conversation

chillinPanda
Copy link
Contributor

@chillinPanda chillinPanda commented Oct 5, 2023

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

When I set up a new docusaurus repo and following the GitHub Pages deployment guide with GitHub Actions, I ran into the issue, that the automatic token has read only access per default.

In order to help new users I added information to the guide, so other users don't have to figure it out on their own

Test Plan

no code change, only mdx

Test links

https://deploy-preview-9373--docusaurus-2.netlify.app/docs/deployment#triggering-deployment-with-github-actions

http://localhost:3000/docs/deployment#triggering-deployment-with-github-actions

New details box "GITHUB_TOKEN permissions"

Related issues/PRs

when I set up a new docusaurus repo and following the GitHub Pages deployment guide with GitHub Actions, I ran into the issue, that the automatic token has read only access per default

in order to help new users I added information to the guide, so other users don't have to figure it out on their own
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Oct 5, 2023
@netlify
Copy link

netlify bot commented Oct 5, 2023

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit ea6af0c
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/651e83fbb7ffd100085e33a4
😎 Deploy Preview https://deploy-preview-9373--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions
Copy link

github-actions bot commented Oct 5, 2023

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 56 🟢 97 🟢 92 🟢 100 🟠 89 Report
/docs/installation 🟠 72 🟢 98 🟢 92 🟢 100 🟠 89 Report

@slorber
Copy link
Collaborator

slorber commented Oct 5, 2023

https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-first-deployment-with-github_token

CleanShot 2023-10-05 at 12 35 36@2x

CleanShot 2023-10-05 at 12 36 07@2x

Are you sure that you followed our instructions properly?

If you did, please create a repro showing the GH pages deployment failing despite using the recommended config.

@chillinPanda
Copy link
Contributor Author

Hi @slorber,

thank you for taking the time to have a look into and answering with much details :) 👍

I used the deploy.yml from the current version (2.4.3) -> https://docusaurus.io/docs/deployment#triggering-deployment-with-github-actions

In the next / canary version I see indeed the permissions section like in your screenshot. In the 2.4.3 it is not there yet.

I reverted the token permissions to the default state and added the permissions section to my action yml and it is working.

So my issue is already solved in the next version and I close this PR.

@chillinPanda chillinPanda deleted the add-github_token-info-to-deployment-guide branch October 5, 2023 15:00
@slorber
Copy link
Collaborator

slorber commented Oct 5, 2023

Thanks

If you want you can add the Yaml permission to the v2.4.3 docs, didn't see it wasn't there and it would help others as well.

@chillinPanda
Copy link
Contributor Author

Hi @slorber ,

Good idea! Will do.

I didn't know that it is ok to modify the current version.

But in this case the addition also works with 2.4.3, so it's a good idea to do.

@chillinPanda
Copy link
Contributor Author

Hi @slorber ,

I created a new PR: #9377

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants