-
Notifications
You must be signed in to change notification settings - Fork 24
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
Request: mention permission and action settings in docs #16
Comments
Honestly I should probably archive this repository. I am not using it and
it has seriously fallen behind necessary practices.
…On Sat, Mar 8, 2025, 11:10 PM Jamie Smith ***@***.***> wrote:
Hi! Thanks for making this action! I was able to get it working on my
project, but I ran into a bit of issues due to changes that GitHub appears
to have made in the last couple years.
First of all, actions do not appear to have push permission to the git
repo by default any more. So, your action will run into an 'error 403'
error on the last step when it tries to push the branch.
Luckily, this is easy to fix, by adding
permissions:
contents: write
to the top level workflow yaml file. That grants it the write permission
that it needs.
Second of all, it would be great to mention somewhere that this workflow
needs the "Deploy from a branch" setting to be set under Settings > Pages
in the repository. This is still the default, but is marked as legacy, and
from the docs it isn't clear which method this action uses.
What worked for me was to set the setting like this:
image.png (view on web)
<https://github.com/user-attachments/assets/70d79cca-a3eb-404d-be60-53aca1901d0e>
and then
GH_PAGES_BRANCH: gh-pages
to the action env in the yaml file.
Maybe someday it would be cool to update this action so that it can deploy
directly to pages, meaning that the pushing could be skipped and it would
run a little faster. But with these settings it is working fine for me.
Anyway, hope this is helpful!
—
Reply to this email directly, view it on GitHub
<#16>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAABJ47Z3E25TAAT6CREEZT2TPSPJAVCNFSM6AAAAABYT5WRX2VHI2DSMVQWIX3LMV43ASLTON2WKOZSHEYDKMRVGA3DKMA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
[image: multiplemonomials]*multiplemonomials* created an issue
(nelsonjchen/gh-pages-pelican-action#16)
<#16>
Hi! Thanks for making this action! I was able to get it working on my
project, but I ran into a bit of issues due to changes that GitHub appears
to have made in the last couple years.
First of all, actions do not appear to have push permission to the git
repo by default any more. So, your action will run into an 'error 403'
error on the last step when it tries to push the branch.
Luckily, this is easy to fix, by adding
permissions:
contents: write
to the top level workflow yaml file. That grants it the write permission
that it needs.
Second of all, it would be great to mention somewhere that this workflow
needs the "Deploy from a branch" setting to be set under Settings > Pages
in the repository. This is still the default, but is marked as legacy, and
from the docs it isn't clear which method this action uses.
What worked for me was to set the setting like this:
image.png (view on web)
<https://github.com/user-attachments/assets/70d79cca-a3eb-404d-be60-53aca1901d0e>
and then
GH_PAGES_BRANCH: gh-pages
to the action env in the yaml file.
Maybe someday it would be cool to update this action so that it can deploy
directly to pages, meaning that the pushing could be skipped and it would
run a little faster. But with these settings it is working fine for me.
Anyway, hope this is helpful!
—
Reply to this email directly, view it on GitHub
<#16>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAABJ47Z3E25TAAT6CREEZT2TPSPJAVCNFSM6AAAAABYT5WRX2VHI2DSMVQWIX3LMV43ASLTON2WKOZSHEYDKMRVGA3DKMA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! Thanks for making this action! I was able to get it working on my project, but I ran into a bit of issues due to changes that GitHub appears to have made in the last couple years.
First of all, actions do not appear to have push permission to the git repo by default any more. So, your action will run into an 'error 403' error on the last step when it tries to push the branch.
Luckily, this is easy to fix, by adding
to the top level workflow yaml file. That grants it the write permission that it needs.
Second of all, it would be great to mention somewhere that this workflow needs the "Deploy from a branch" setting to be set under
Settings > Pages
in the repository. This is still the default, but is marked as legacy, and from the docs it isn't clear which method this action uses.What worked for me was to set the setting like this:
and then add
to the action env in the yaml file.
Maybe someday it would be cool to update this action so that it can deploy directly to pages, meaning that the pushing could be skipped and it would run a little faster. But with these settings it is working fine for me.
Anyway, hope this is helpful!
The text was updated successfully, but these errors were encountered: