generated from coatless-tutorials/quarto-book-template
-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (53 loc) · 1.77 KB
/
quarto-render.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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
pages: write
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
# Step 1: Check out the repository, obtain a copy of the repository on the runner
- name: Check out repository
uses: actions/checkout@v4
# Step 2: Set up Quarto with LaTeX for PDF builds
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
# To install LaTeX to build PDF book
tinytex: true
# Step 3: Install R and its dependencies
# 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
# Step 4: Install Python and its dependencies
- 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
# Step : 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