You can modify these options in Settings : Pages for your repository.
gh-pages service from github.com
at first gh-pages branch doesn’t exist: don’t worry, quarto will create later
master/main is our branch: root
(2) Define Ignoring Output
It’s important to note that you don’t need to check your _site or _book directory into version control (if you have done this in the past you know it makes for very messy diffs!). Before proceeding you should add the output directory of your project to .gitignore. For example:
## .gitignore/.quarto//_site/
If you’ve already checked these files into source control you may need to remove them explicitly:
## Terminalgit rm -r _site
(3) Publish on branch gh-pages
Once you have configured the source branch and updated your .gitignore, navigate to the directory where your project / git repository is located, make sure you are not on the gh-pages branch, and execute the quarto publish command for GitHub Pages:
## Terminalquarto publish gh-pages
The publish command will confirm that you want to publish, render your content, copy the output to a special gh-pages branch, push that branch to GitHub, and then open a browser to view your site once it is deployed.
After this first time it will be no necessary to call gh-pages brach, once it has been defined as default:
##Terminalquarto publish
(4) Website published
Your Quarto website will be published by GitHub pages on:
userName.github.io\repositoryName
2 Publishing quarto website 2024
(0) set up tools
You need to set up these tools:
git & gh CLI tools installed
github.com account created and user logged in
gh auth login (our machine connected to Github.com) executed