Skip to content

Blogdown and bookdown examples need contents write permission#874

Merged
gaborcsardi merged 9 commits intor-lib:v2-branchfrom
remlapmot:permissions-fix
Aug 2, 2024
Merged

Blogdown and bookdown examples need contents write permission#874
gaborcsardi merged 9 commits intor-lib:v2-branchfrom
remlapmot:permissions-fix

Conversation

@remlapmot
Copy link
Copy Markdown
Contributor

I think that both the blogdown.yaml and bookdown.yaml examples require to write to contents because they are using the gh-pages branch.

@remlapmot
Copy link
Copy Markdown
Contributor Author

I think the pr-commands.yaml, document.yaml, and render-rmarkdown.yaml were also missing contents write permissions. So I have added that to those and regenerated examples/README.md

@nanxstats
Copy link
Copy Markdown

Can confirm this issue for the (canonical) blogdown workflow. Without the write permission, the final "Deploy to GitHub Pages" step will have trouble writing to the gh-pages branch with the following error:

Force-pushing changes...
/usr/bin/git push --force ***github.com/<user>/<user>.github.io.git github-pages-deploy-action/b7eexlozc:gh-pages
remote: Permission to <user>/<user>.github.io.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/<user>/<user>.github.io.git/': The requested URL returned error: 403
...
Error: The deploy step encountered an error: The process '/usr/bin/git' failed with exit code 128 ❌
Notice: Deployment failed! ❌

nr0cinu added a commit to jmf-vienna/jmf-r that referenced this pull request Jul 28, 2024
@gaborcsardi gaborcsardi requested a review from jeroen July 31, 2024 12:42
gaborcsardi
gaborcsardi previously approved these changes Jul 31, 2024
Copy link
Copy Markdown
Member

@gaborcsardi gaborcsardi left a comment

Choose a reason for hiding this comment

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

Thanks!

@gaborcsardi gaborcsardi merged commit fd93f72 into r-lib:v2-branch Aug 2, 2024
@remlapmot remlapmot deleted the permissions-fix branch August 2, 2024 10:36
@github-actions
Copy link
Copy Markdown

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue and include a link to this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants