Learning to use GitHub gh-pages and actions, the only way...
My steps so far:
-
I created the main repository, and added some content. Basically
- a
.gitignore
file - a simple
Makefile
to build and clean a LaTeX file in.doc/
- a
-
I activated an action here --- the fist step is basically to compile the LaTeX file. I used new action -> build your own and edited it so that it runs on pushed for the
main
branch. -
I want to create the page from a blank
gh-pages
branch. I failed to find info on GitHub help, but it seems that this blog entry form Jia Fu Low is the solution. Basically I did, after adjusting.gitignore
to have a fully clean status:git checkout --orphan gh-pages git reset --hard
check that nothing is in your root; I added a .gitignore for this now
git add .gitignore git commit -m "Set-up gh-pages orphan branch" git push origin gh-pages
-
Went to Settings -> Pages and the page was already on (!); I choosed a theme (minimal).
-
To keep also
gh-pages
in sync, I did (hope it's ok)git branch --set-upstream-to origin/gh-pagetmp
-
Try to apply Deploy to GitHub pages
- in the first test it wiped out my
gh-pages
branch... - it needs a
clean: false
!
- in the first test it wiped out my
-
Changing names to actions and try to add an action for PR.
- works ok, now I have one action that deploys (on pushes to main) and another one that just checks (on PRs)
- if you add
[skip ci]
in the commit or merge title it will... skip actions.