Skip to content

Commit 90fcbca

Browse files
authored
Add GitHub Actions workflow for Quarto site deployment
Add GitHub Actions CI/CD workflow that automatically renders the Quarto website and deploys it to GitHub Pages whenever changes are pushed to the repository. The workflow: - Spins up an Ubuntu runner - Installs R 4.4.0 and required packages (leaflet, base64enc) - Installs Quarto - Renders the site with `quarto render` - Commits and pushes the updated `docs/` folder back to the repository This allows contributors to add or edit .qmd files directly on GitHub.com without needing a local R/Quarto installation.
1 parent f61be2d commit 90fcbca

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Render & Deploy Quarto Site
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
7+
jobs:
8+
build-deploy:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repo
13+
uses: actions/checkout@v4
14+
15+
- name: Setup R
16+
uses: r-lib/actions/setup-r@v2
17+
with:
18+
r-version: '4.4.0'
19+
20+
- name: Install R packages
21+
run: |
22+
install.packages(c("leaflet", "base64enc"), repos = "https://cloud.r-project.org")
23+
shell: Rscript {0}
24+
25+
- name: Setup Quarto
26+
uses: quarto-dev/quarto-actions/setup@v2
27+
28+
- name: Render Quarto site
29+
working-directory: One-Tick.github.io
30+
run: quarto render
31+
32+
- name: Commit and push docs/
33+
working-directory: One-Tick.github.io
34+
run: |
35+
git config --global user.name "github-actions[bot]"
36+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
37+
git add docs/
38+
git diff --staged --quiet || git commit -m "Auto-render site [skip ci]"
39+
git push

0 commit comments

Comments
 (0)