Skip to content

Commit 3cc4d59

Browse files
authored
Build Site with GitHub Actions (#14)
## Overview This PR updates the project environment by cleaning up the `renv` setup and upgrading to R v4.5.1. It also introduces a GitHub Action to automatically build and deploy the site whenever changes are pushed to the `main` branch. Addresses #13 . ## Details - Removed the docs folder and added it to `.gitignore` to keep the repository root cleaner. - Local site previews can still be run with `quarto preview`. - GitHub Actions now build the site using R v4.5.1, consistent with the version recorded in the `renv` lockfile. ## Developer Notes - When adding new libraries, run `renv::snapshot()` and commit the updated lockfile. ## Breaking Changes - Repository settings must be updated so GitHub Pages deploys from the `gh-pages` branch. - The `gh-pages` branch may need to be initialized before deployment.
2 parents 78d12af + 10303fa commit 3cc4d59

39 files changed

+347
-17676
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
on:
2+
workflow_dispatch:
3+
push:
4+
branches: main
5+
6+
name: quarto_publish.yml
7+
8+
jobs:
9+
build-deploy:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- name: Check out repository
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Quarto
18+
uses: quarto-dev/quarto-actions/setup@v2
19+
20+
- name: Install R
21+
uses: r-lib/actions/setup-r@v2
22+
with:
23+
r-version: '4.5.1'
24+
25+
- name: Install R Dependencies
26+
uses: r-lib/actions/setup-renv@v2
27+
with:
28+
cache-version: 1
29+
30+
- name: Render and Publish
31+
uses: quarto-dev/quarto-actions/publish@v2
32+
with:
33+
target: gh-pages
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@
55
Icon?
66
.DS_Store
77
/.quarto/
8+
/_site/
9+
/_book/
10+
docs

_quarto.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
project:
22
type: book
3-
#type: website
4-
output-dir: docs/
3+
54

65
book:
76
title: "JRaviLab docs"

docs/.nojekyll

Whitespace-only changes.

docs/JRaviLab-docs.pdf

-130 KB
Binary file not shown.

docs/career-dev.html

Lines changed: 0 additions & 524 deletions
This file was deleted.

docs/culture.html

Lines changed: 0 additions & 1149 deletions
This file was deleted.

docs/howto.html

Lines changed: 0 additions & 957 deletions
This file was deleted.

docs/howto_code_review.html

Lines changed: 0 additions & 908 deletions
This file was deleted.

docs/howto_make_poster.html

Lines changed: 0 additions & 884 deletions
This file was deleted.

0 commit comments

Comments
 (0)