Skip to content

Commit b67cc31

Browse files
committed
Make sure R and correct packages are installed
1 parent 1f0e029 commit b67cc31

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

.github/workflows/custom-pages.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ name: Custom GitHub Pages Build and Deploy
33
on:
44
push:
55
branches:
6-
- test # Only trigger this workflow when pushing to 'test '
7-
workflow_dispatch: # Allows you to trigger the workflow manually if desired
6+
- custom-site # or any branch you want to test on
7+
workflow_dispatch: # optional, for manual triggering
88

99
jobs:
1010
build:
@@ -13,18 +13,25 @@ jobs:
1313
- name: Checkout repository
1414
uses: actions/checkout@v2
1515

16+
- name: Set up R
17+
uses: r-lib/actions/setup-r@v2
18+
1619
- name: Set up Quarto
1720
uses: quarto-dev/quarto-actions/setup@v2
1821

22+
# If you use renv to manage your R packages:
23+
- name: Restore R dependencies with renv
24+
run: Rscript -e 'renv::restore()'
25+
26+
# Alternatively, if not using renv, install packages manually:
27+
# - name: Install required R packages
28+
# run: Rscript -e 'install.packages(c("pkg1", "pkg2"), dependencies = TRUE)'
29+
1930
- name: Render site with Quarto
2031
run: quarto render
2132

22-
- name: List files for debugging
23-
run: ls -la
24-
25-
# You can adjust the publish_dir if your build output goes to a different directory.
2633
- name: Deploy to GitHub Pages
2734
uses: peaceiris/actions-gh-pages@v3
2835
with:
2936
github_token: ${{ secrets.GITHUB_TOKEN }}
30-
publish_dir: ./_site
37+
publish_dir: ./_site # Adjust if your output directory is different

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.

0 commit comments

Comments
 (0)