Prioritize new quarto #16
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 # freeze R | |
| with: { r-version: "4.4.2" } | |
| - uses: r-lib/actions/setup-pandoc@v2 # Quarto needs Pandoc | |
| - uses: quarto-dev/quarto-actions/setup@v2 | |
| with: | |
| version: '1.6.43' | |
| - name: Uninstall any pip-installed Quarto | |
| run: pip uninstall -y quarto-cli || true | |
| - name: Force system Quarto in PATH | |
| run: echo "PATH=/usr/bin:$PATH" >> $GITHUB_ENV | |
| # speed: reuse compiled packages | |
| - 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- | |
| # restore packages exactly as in renv.lock | |
| - name: Restore R packages | |
| run: Rscript -e 'renv::restore(prompt = FALSE)' | |
| # build the site | |
| - name: Render site | |
| run: quarto render | |
| - name: List rendered files # optional debug | |
| run: ls -la docs | |
| # deploy | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./docs | |
| publish_branch: gh-pages |