Skip to content

clean: github action Quarto Publish #11

clean: github action Quarto Publish

clean: github action Quarto Publish #11

Workflow file for this run

on:
workflow_dispatch:
pull_request:
branches: [main, master]
push:
# only trigger on main/master branches, not on tags
branches: [main, master]
name: Quarto Publish
jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
# Obtain a copy of the repository on the runner
- name: Check out repository
uses: actions/checkout@v4
# Install Quarto
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
# To install LaTeX to build PDF book
tinytex: true
# Setup R
# Handle installing R packages from DESCRIPTION file
- name: Install R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Install R Dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 1
# Download latest version of Python
- name: "Install Python"
uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: 'pip'
- name: "Install Python Dependencies"
run: |
pip install pyyaml jupyter nbformat
pip install -r requirements.txt
# Render and Publish the Quarto book using GitHub actions
# Built-in {{GITHUB_PAT}} environment variable is used to authenticate with GitHub.
# Write access to the repository is required to publish to the gh-pages branch.
- name: Render and Publish to GitHub Pages
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}