Render target #202
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: | |
push: | |
branches: | |
- render-replace | |
# paths: ['**.Rmd'] | |
name: Render and Publish Website | |
permissions: | |
contents: write | |
pages: write | |
jobs: | |
render-website: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Pandoc | |
uses: r-lib/actions/setup-pandoc@v2 | |
- name: Set up Quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
with: | |
tinytex: true | |
- name: Set up R | |
uses: r-lib/actions/setup-r@v2 | |
- name: Install R dependencies | |
uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
packages: | |
any::rmarkdown | |
any::sessioninfo | |
any::tidyr | |
local::rpackage | |
github::stan-dev/cmdstanr | |
# _site.yml file configured to render website to the _site folder, | |
# which is the expected location for the Quarto publish step | |
- name: Render Main Rmarkdown Website | |
run: rmarkdown::render_site() | |
shell: Rscript {0} | |
# Assignments _quarto.yml file configured to render website to the | |
# _site/assignments folder | |
- name: Render Assignments Quarto Sub-website | |
uses: quarto-dev/quarto-actions/render@v2 | |
with: | |
path: assignments | |
- name: Publish to GitHub Pages | |
uses: quarto-dev/quarto-actions/publish@v2 | |
with: | |
target: gh-pages | |
path: _site | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # this secret is always available for github actions |