I have two website repos which I have been experimenting with. One is built with Hugo, one is an export through emacs-org mode.
The Hugo repo has a gh-pages.yml
which specifies the github actions to be performed when committed.
I have been swapping between which repo I push from, by using git push -F origin/main
.
When I do this, regardless of which repo I've pushed from, the github actions is the same, which seems to use jekyll to try and build the website. However, I haven't specified jekyll in either, so i'm not sure where this comes from. This results in a 404 error for the Hugo repo (because the correct github-actions are not being performed), and the correct website for the org-emacs repo.
With github pages, is there a standard action being performed on each commit? If so, why won't a gh-pages.yml
file located in .github/workflows/
change that?
CodePudding user response:
Use of custom workflows to deploy to GitHub Pages is determined by repo's settings:
Settings -> Pages -> Build and deployment -> Source
You need to select GitHub Actions as Source. When you do, GitHub should suggest a starter workflow for you. In case of a repo that I worked on which uses a custom workflow for deployment, the file is named pages.yml but I guess gh-pages.yml might be a correct name as well.