Initial commit #7
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: Render Quarto Project | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: # Allows manual triggering | |
| jobs: | |
| build-and-render: | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} # Recommended for package installs | |
| steps: | |
| - name: Check Out Repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Quarto | |
| uses: quarto-dev/quarto-actions/setup@v2 | |
| with: | |
| version: 1.4.515 | |
| - name: Set up R | |
| uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: 'release' # Or specify a version like '4.3.2' | |
| - name: Cache R packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.R_LIBS_USER }} | |
| key: ${{ runner.os }}-r-${{ runner.arch }}-${{ hashFiles('**/DESCRIPTION') }}-${{ hashFiles('**/renv.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-r-${{ runner.arch }}- | |
| - name: Install R Package Dependencies | |
| uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| packages: | | |
| any::ggplot2 | |
| any::dplyr | |
| any::rmarkdown | |
| any::knitr | |
| any::readr | |
| any::tidyr | |
| any::tibble | |
| any::stringr | |
| any::lubridate | |
| any::forcats | |
| any::scales | |
| any::plotly | |
| any::quarto | |
| # Optional: Uncomment to use a DESCRIPTION file | |
| # dependencies: | | |
| # Remotes, Imports, Suggests | |
| - name: Install TinyTeX (for PDF output) | |
| run: quarto install tool tinytex | |
| - name: Render Quarto Project | |
| run: | | |
| quarto render | |
| shell: bash | |
| - name: Upload Rendered Output | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rendered-site | |
| path: docs | |
| if-no-files-found: error |