2025-07-18
Online based platform that is used, along with git, for version control of software projects and makes collaboration easier between developers
Version control means tracking modifications, creations, and deletions of project files
Connects your local development enviroment, or local repository, to online/cloud based storage, remote repository, to keep track of modifications and make it easier to share with others
Open-source scientific and technical publishing system that allows for the use of narrative text with code
However not just limited to a singular file, allows for easy setup of other types of project like websites, presentations, dashboards, books, etc.
The ability to change formats easily and incoporate other languages than only R removes previous limitations and allows for better communication of projects and workflows
Easier Publication Submission - Everything is together and well documented (hopefully🤞) to be submitted for publication
Reproducibility - allows others to easily have access to how an analysis was done and be able to replicate it
Branding - Having an online resume/cv of all your projects and those you have collaborated on with others
Log in to your GitHub account.
Click on the New Repo button.
Name your repo with purpose (your name for a personal website, a project name, a course name, etc.)
Click the Create Repository button.
Once on the page below, click Set up in Desktop.
Once in Github Desktop, pick what directory you would like to store the repository locally. This action will create a remote repository connecting it to the one you have online.
Try to keep organized and do this in a directory dedicated to your GitHub projects.
Navigate to your remote repository through the files window.
Once in the remote repository, click the gears icon and Set As Working Directory.
Make sure your working directory is in your local repository
Find the terminal tab in your RStudio window:
Type the following command in the terminal to create an RProject and setup a quarto website, a new window of RStudio will appear:
When asked for Directory put .
for the current directory and when asked for a Title give it the title of your project with no spaces (use _ instead):
On the new Rstudio window refresh and check out the new files by refreshing the files window:
In Github desktop type a commit message and commit to main.
After commiting your changes and message, hit publish to origin.
Back in your GitHub account, you should see the brown circle indicating GitHub is going through your workflow file and setting up your website:
After it has completed successfully the brown circle should turn to a green check mark, if it is not successful it will turn into a red x:
In Github website refresh and view all branches in the repository by following the steps below:
Make sure to name it gh-pages, it has to be named this in order for your website to work.
Back in R studio do the following:
.nojekyll
, it does not need to contain anythingCreate .github
folder in your working directory
Create a folder named workflows
inside the .github
folder
Create a text file named publish.yml
inside the folder .github/workflows
Copy and paste below into the publish.yml
:
publish.yml
on:
workflow_dispatch:
push:
branches: main
name: Quarto Publish
jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Navigate to settings of your repository.
Then navigate to pages.
In pages make sure that under Build and Deployment Source is Deploy from Branch. Also make sure that under Branch that gh-pages is selected from /(root) like below:
index.qmd
projects.qmd
- with the following content:projects.qmd
Create a projects folder
Move about.qmd
to the projects folder and rename it to your project_title.qmd (Change to your project title or something descriptive!)
Now change the listing in the _quarto.yml
:
_quarto.yml
publish.yml
to run R codeTo run your Quarto R code cells/blocks and have their output displayed on your website (without errors) you must add R enviroment development step to your workflow file:
publish.yml
name: Quarto Publish
on:
workflow_dispatch:
push:
branches: main
jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.2'
- name: Set up R Dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
packages:
any::knitr
any::rmarkdown
any::tidyverse
any::tidymodels
any::GGally
any::ggstats
any::cowplot
any::lme4
any::lmerTest
any::psycModel
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
styles.scss
/*-- scss:defaults --*/
// Colors
$dark-green: #596b57;
$light-green: #D1D9CE;
$cream: #FDFBF7;
$gray: #64605f;
$orange: #ad7237;
$black: #151617;
// Base document colors
$navbar-bg: $dark-green; // navbar
$navbar-fg: $cream; // navbar foreground elements
$navbar-hl: $light-green; // highlight color when hovering over navbar links
$body-bg: $cream; // page background
$body-color: $black; // page text
$footer-bg: $cream; // footer
// Inline code
$code-bg: $cream; // inline code background color
$code-color: $orange; // inline code text color
_quarto.yml
change the following: