mxochicale/intro-to-git-and-github

Quarto slides with github pages

mxochicale opened this issue · 3 comments

Combining Quarto slides with GitHub Pages creates an excellent synergy for crafting slide templates and their structure. With this in mind, I'm kickstarting one initial iteration. For further details on quarto, have a look to this https://github.com/mxochicale/tools/tree/main/quarto

Run quarto-dev/quarto-actions/publish@v2
Run git config --global user.email "quarto-github-actions-publish@example.com"
ERROR: Unable to publish to GitHub Pages (the remote origin does not have a branch named "gh-pages". Use first quarto publish gh-pages locally to initialize the remote repository for publishing.)
Stack trace:
at resolveDeployment (file:///opt/quarto/bin/quarto.js:106225:19)
at eventLoopTick (ext:core/01_core.js:183:11)
at async publishAction (file:///opt/quarto/bin/quarto.js:106679:9)
at async Command.fn (file:///opt/quarto/bin/quarto.js:106659:9)
at async Command.execute (file:///opt/quarto/bin/quarto.js:8104:13)
at async quarto (file:///opt/quarto/bin/quarto.js:115002:5)
at async file:///opt/quarto/bin/quarto.js:115020:9
Error: Process completed with exit code 1.

I think I am missing to add Github Actions GitHub Pages Jekyll in settings but still not sure!

git checkout --orphan gh-pages 
#An orphan branch is not connected to the other branches and commits, and its working tree has no files at all. 
#See [here](https://git-scm.com/docs/git-checkout) for more info.
git reset --hard
git commit --allow-empty -m "Initializing gh-pages branch"
git push origin gh-pages
git checkout main
#https://jiafulow.github.io/blog/2020/07/09/create-gh-pages-branch-in-existing-repo/

Then Select deploy from branch and select gh-pages