Skip to content

Merge pull request #280 from emiliom/patch-3 #4

Merge pull request #280 from emiliom/patch-3

Merge pull request #280 from emiliom/patch-3 #4

Workflow file for this run

name: Publish Quarto book
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-deploy:
name: Render & publish Quarto book
runs-on: macOS-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install Quarto
uses: quarto-dev/quarto-actions/setup@v2
# with:
# tinytex: true # for pdf but buggy on finding version
# - name: Install chromium for Quarto
# # for rendering Mermaid diagrams to pdf: https://quarto.org/docs/authoring/diagrams.html#chrome-install
# run: quarto install chromium
- name: Install TinyTeX
uses: r-lib/actions/setup-tinytex@v2
- name: Install librsvg
# convert svg to png for pdf
run: brew install librsvg
- name: Install R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.4.1' # 2024-09-04
- name: Install R dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 2
- name: Prep files for Quarto render
# copy eDNA README.md to .qmd (placeholder for _quarto.yml)
# necessary for `quarter render` to work, and before pre-render script overwrites .qmd
run: cp datasets/dataset-edna/README.md datasets/dataset-edna/README.qmd
- name: Quarto Render and Publish
# TODO: `quarto publish gh-pages` https://quarto.org/docs/publishing/github-pages.html#publishing
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}