peaceiris/actions-gh-pages

support: Can't deploy a Hugo site due to "The requested URL returned error: 403"

EmilyGraceSeville7cf opened this issue · 6 comments

Checklist

  • I am using the latest version of this action.
  • I have read the latest README and followed the instructions.
  • I have read the latest GitHub Actions official documentation and learned the basic spec and concepts.

Describe your question

I have a personal repo and I want deploy this site. But I can't due to The requested URL returned error: 403 error. Why it happens? What am I missing to successfully deploy my site? As I understand:

  • site is being built to public folder
  • this folder contents is pushed to gh-pages
  • gh-pages is used to deploy site

Is it right? Why there is no gh-pages branch created after any new commit?

Relevant links

Public repository: https://github.com/EmilySeville7cfg/EmilySeville7cfg.github.io
YAML config: https://github.com/EmilySeville7cfg/EmilySeville7cfg.github.io/blob/master/config.yml
YAML workflow: https://github.com/EmilySeville7cfg/EmilySeville7cfg.github.io/blob/master/.github/workflows/cd.yml

Relevant log output

https://github.com/EmilySeville7cfg/EmilySeville7cfg.github.io/runs/6324319546?check_suite_focus=true#step:5:106

Additional context.

No response

This is the same as the issue #742 (comment)

Please change the repository setting (Go to Actions > General > Workflow permissions) as follows:

  • Toggle the Read and write permissions

スクリーンショット 2022-05-06 23 26 07

Issue is solved but my site is still inaccessible. 🤔

We need to select the branch to deploy in the Pages tab of the repository settings.

スクリーンショット 2022-05-06 23 36 46

Your GitHub Pages site is currently being built from the master branch is confusing description because when I hear built I think about just building site via some static site generator. Thanks! Everything works now. ❤️

Please change the repository setting (Go to Actions > General > Workflow permissions) as follows:

  • Toggle the Read and write permissions

would be nic if a notice about this is added to the documentation

#753 is another solution.