chore: update instructions #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
name: Render and Publish | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
env: | |
RENV_PATHS_ROOT: ~/.cache/R/renv | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Install R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: '4.4.1' # The R version to download (if necessary) and use. | |
- name: Set up Quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
with: | |
version: '1.5.22' | |
- name: Prep CURL install | |
run: sudo apt-get update | |
- name: Install CURL Headers | |
run: sudo apt-get install libcurl4-openssl-dev | |
# - name: Setup Renv | |
# uses: r-lib/actions/setup-renv@v2 | |
- name: Cache packages | |
uses: actions/cache@v1 | |
with: | |
path: ${{ env.RENV_PATHS_ROOT }} | |
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }} | |
restore-keys: | | |
${{ runner.os }}-renv- | |
- name: Restore packages | |
shell: Rscript {0} | |
run: | | |
if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv") | |
renv::restore() | |
renv::install('reticulate') | |
- name: Publish to GitHub Pages (and render) | |
uses: quarto-dev/quarto-actions/[email protected] | |
with: | |
target: gh-pages | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # this secret is always available for github actions | |
# Commit all changed files back to the repository | |
# Trying this because the pdf would not write to the repo | |
- uses: stefanzweifel/git-auto-commit-action@v5 |