Open luz-ojeda opened 1 year ago
Fixed it. I had to configure Workflow permissions
to "Read an write permissions" in the repo settings -> Actions -> General, to the bottom of the page. It was set to "Read repository contents and package permissions" by default.
Hi @lezojeda
Thanks for your issue, and it's so glad to hear that you've solved the problem. And welcome to star this project for further update in the future.
Thanks & Regards
Can confirm, this was an issue for me and the change to permissions fixed this issue for me as well. It'd be worthwhile to put a note about this in the project's readme - it's the only hurdle that I had in getting this awesome action to work!
@lezojeda Made the trick! Thank you
if you do not want to change the default workflow permissions you can also set permissions for this workflow alone.
add something like this permissions
block to your workflow:
...
jobs:
build_and_deploy:
runs-on: ubuntu-latest
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
permissions:
contents: write # read to check out code / write enables push to the configured branch (e.g. gh-pages)
pages: write
steps:
- uses: actions/checkout@v2
...
Hello. If I understand correctly (correct me if I don´t please), if I commit to
master
I should expect two actions to be triggered, the custom one from the yml file and thepages build and deployment
from github itself right? I have created the yml workflow file under.github/workflows/
, set up the deployment to be fromgh-pages
branch but when I commit tomaster
,gh-pages
remains empty so I get a 404 when I go to my pages urlThis is how the repo pages section is configured:
Thanks in advance