Skip to content

Commit b00ec08

Browse files
Merge pull request #16 from How-to-Learn-to-Code/test
Changes to the .qmd files outlined in _quarto.yml will now automatically be published to the website when a push is made. Be careful when new packages are added--they need to be specified in the renv.lock.
2 parents bab6f8d + b1b2cae commit b00ec08

File tree

5 files changed

+53
-4
lines changed

5 files changed

+53
-4
lines changed

.github/workflows/custom-pages.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Build-and-Deploy
2+
3+
on:
4+
push:
5+
branches: [ test ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: r-lib/actions/setup-r@v2 # freeze R
16+
with: { r-version: "4.4.2" }
17+
18+
- uses: r-lib/actions/setup-pandoc@v2 # Quarto needs Pandoc
19+
20+
- uses: quarto-dev/quarto-actions/setup@v2
21+
22+
# speed: reuse compiled packages
23+
- name: Cache renv packages
24+
uses: actions/cache@v4
25+
with:
26+
path: |
27+
~/.cache/R/renv
28+
renv/cache
29+
key: ${{ runner.os }}-renv-${{ hashFiles('renv.lock') }}
30+
restore-keys: ${{ runner.os }}-renv-
31+
32+
# restore packages exactly as in renv.lock
33+
- name: Restore R packages
34+
run: Rscript -e 'renv::restore(prompt = FALSE)'
35+
36+
# build the site
37+
- name: Render site
38+
run: quarto render
39+
40+
- name: List rendered files # optional debug
41+
run: ls -la docs
42+
43+
# deploy
44+
- name: Deploy
45+
uses: peaceiris/actions-gh-pages@v3
46+
with:
47+
github_token: ${{ secrets.GITHUB_TOKEN }}
48+
publish_dir: ./docs
49+
publish_branch: gh-pages

_quarto.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ project:
33
output-dir: docs
44

55
book:
6-
site-url: https://h2l2cR.com
6+
site-url: https://how-to-learn-to-code.github.io/Rclass-DataScience/
77
sidebar:
88
tools:
99
- icon: github

class0.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ format:
77

88
## Introduction
99

10-
This page will walk you through setting up access to UNC's computing cluster and introduce you a bit to R and R Studio so we can hit the ground running in the first class. To ensure you have access to the UNC cluster (and thus able to participate in class), **please review this document in full at least 24 hours in advance of the first class**--Research IT will need time to approve your account request.
10+
Test test This page will walk you through setting up access to UNC's computing cluster and introduce you a bit to R and R Studio so we can hit the ground running in the first class. To ensure you have access to the UNC cluster (and thus able to participate in class), **please review this document in full at least 24 hours in advance of the first class**--Research IT will need time to approve your account request.
1111

1212
## Class 0 Objectives
1313

class1.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,4 +281,4 @@ Since this is a built-in dataset, we can get some help. Try running the code bel
281281
?mean()
282282
```
283283

284-
Adding a `?` before the name of a function or data frame (built-in or from a package) pulls up a help file in the Help tab of the Output pane. If you aren't sure what a function does, this should be your first step.
284+
Adding a `?` before the name of a function or data frame (built-in or from a package) pulls up a help file in the Help tab of the Output pane. If you aren't sure what a function does, this should be your first step.

class2.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ data(package = "palmerpenguins")
7878

7979
Your former lab mate Weird Barbie graduated a few years ago. Before she left, she was working on some interesting analyses of the frequencies of Kens.
8080

81-
This is a test!
81+
This is a test
8282

8383
![photo credit: Warner Bros.](data/class2_files/weirdbarbie.jpeg){fig-align="center"}
8484

0 commit comments

Comments
 (0)