Logged into GitHub and clicked on the “Create new…” icon
Selected “New repository” and specified owner, name, and description
Chose public visibility, turned on README, and added the R .gitignore template
Clicked on Create new repository, then copied the repository URL
B.2 Cloned to a local directory and set up repository as an R project
Cloned repository with RStudio to create an associated .Rproj file by navigating to File > New Project > Version Control > Git and then pasting the repository URL
Staged, committed, and pushed the new .Rproj file
B.3 Prepared use of Quarto in the repository
Added a new line for /.quarto/ to the .gitignore to ignore temporary files generated during the rendering process and remove the line that ignores docs/
Staged, committed, and pushed the 2 new files and the changes to the .gitignore file
B.4 Rendered html and pdf
Restarted RStudio for the Build tab to appear
In the build tab, selected Render Book > All Formats
Staged, committed, and pushed the new docs folder
B.5 Configured GitHub pages
Navigated to Pages in the Repository settings on GitHub
Selected and saved the main Branch and /docs folder as the source
Refreshed the browser and copied the URL
B.6 Created a new chapter in the book
Created a new quarto file called github.qmd in the R Studio project
Added the name of the new GitHub quarto file to the _quarto.yml list of chapters
In the build tab, selected Render Book > All Formats
Staged, committed, and pushed the new github.qmd file along with the updated /docs and _quarto.yml file
B.7 Protected the main branch and required all future changes to be submitted via pull requests
Configured required use of pull requests to prevent future merge conflicts by navigating to Settings > Branches > Add classic branch protection rule and then specifying the branch name pattern “main” along with selecting “Require a pull request before merging”
B.8 Prepare the repository to run python when engine is specified as jupyter
Download python
Set a Default Python Interpreter in RStudio
Install Jupyter Kernel and the PyYAML via terminal: pip install PyYAML
Install Jupyter Kernel via termina: pip install jupyter
Install libraries via termina: pip install numpy pandas matplotlib seaborn
Create a test_python.qmd file, include: engine: jupyter
B.9 Set up a github action to automatically render the project’s html and pdf files