Skip to content

Quarto Publish

Quarto Publish #33

Workflow file for this run

on:
workflow_dispatch:
schedule:
- cron: "0 23 * * 0"
push:
branches: main
name: Quarto Publish
jobs:
quarto-publish:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Install R with renv
uses: r-lib/actions/setup-r@v2
with:
r-version: renv
if: ${{ hashFiles('renv.lock') != '' }}
- name: Install R Dependencies with renv
uses: r-lib/actions/setup-renv@v2
with:
cache-version: 1
if: ${{ hashFiles('renv.lock') != '' }}
- name: Install R latest
uses: r-lib/actions/setup-r@v2
if: ${{ hashFiles('renv.lock') == '' }}
- name: Cache R packages
uses: actions/cache@v4
with:
path: ~/.R
key: ${{ runner.os }}-R-${{ hashFiles('**/*.R') }}
restore-keys: |
${{ runner.os }}-R-
if: ${{ hashFiles('renv.lock') == '' }}
- name: Install R latest dependencies
run: |
install.packages("rmarkdown")
install.packages("yaml")
install.packages(renv::dependencies()$Package)
shell: Rscript {0}
- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}