Skip to content

Merge pull request #2 from MartinaHYang/main #3

Merge pull request #2 from MartinaHYang/main

Merge pull request #2 from MartinaHYang/main #3

on:
push:
branches: main
name: Render and Publish
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
# IMPORTANT: Use `actions/checkout@v4`.
# Note: The tutorial "https://openscapes.github.io/quarto-website-tutorial/explore.html" mentions `actions/checkout@v2`,
# but that version is outdated and leads to error message. Always use the latest stable version for compatibility and performance.
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
# To install LaTeX to build PDF book
tinytex: true
# uncomment below and fill to pin a version
# version: 0.9.600
# add software dependencies here
- name: Setup R
uses: r-lib/actions/setup-r@v2
# From https://github.com/r-lib/actions/tree/v2-branch/setup-r
# Reference: https://github.com/quarto-dev/quarto-actions/blob/main/examples/quarto-publish-example.yml
- name: Install needed R packages
uses: r-lib/actions/setup-r-dependencies@v2
# update from: uses: r-lib/actions/setup-renv@v2
- name: Publish to GitHub Pages (and render)
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # this secret is always available for github actions