add Extras page #24
This file contains hidden or 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
name: Build-and-Deploy | |
on: | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: '4.4.2' | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: quarto-dev/quarto-actions/setup@v2 | |
with: | |
version: '1.6.43' | |
# ────────────────────────────────────────────────────────────────────── | |
# Prepend /usr/bin so the .deb version of Quarto wins over any shims | |
- name: Prioritize APT-installed Quarto | |
run: echo "PATH=/usr/bin:${PATH}" >> $GITHUB_ENV | |
# Debug: confirm the right binary is being used | |
- name: Check Quarto version | |
run: | | |
echo "Which quarto:" | |
which -a quarto | |
echo "Version:" | |
quarto --version | |
- name: Install quarto-live extension | |
run: quarto add --no-prompt r-wasm/quarto-live | |
# ────────────────────────────────────────────────────────────────────── | |
- name: Cache renv packages | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/R/renv | |
renv/cache | |
key: ${{ runner.os }}-renv-${{ hashFiles('renv.lock') }} | |
restore-keys: ${{ runner.os }}-renv- | |
- name: Restore R packages | |
run: Rscript -e 'renv::restore(prompt = FALSE)' | |
- name: Render site | |
run: quarto render | |
- name: List rendered files | |
run: ls -la docs | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs | |
publish_branch: gh-pages |