Skip to content

Change GH actions workflow to include dependencies for PDF rendering #36

Change GH actions workflow to include dependencies for PDF rendering

Change GH actions workflow to include dependencies for PDF rendering #36

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Render and Publish
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches:
- 'main'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build-deploy"
build-deploy:
# The type of runner that the job will run on
runs-on: ubuntu-latest
permissions:
contents: write
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Check out repository
uses: actions/checkout
# Runs a single command using the runners shell
# - name: Run a one-line script
# run: echo Hello, world!
# Runs a set of commands using the runners shell
# - name: Run a multi-line script
# run: |
# echo Add other actions to build,
# echo test, and deploy your project.
- name: Download R dependencies for rendering to PDF
uses: r-lib/actions/setup-r-dependencies@v2
with:
packages:
any::rmarkdown
any::knitr
- 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: SPECIFIC-QUARTO-VERSION-HERE
- 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