-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (48 loc) · 1.78 KB
/
quarto-gh-pages-html.yaml
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
59
60
# based on: https://github.com/quarto-dev/quarto-actions/blob/main/examples/quarto-book-gh-pages.yaml
on:
push:
branches: main
pull_request:
branches: main
# to be able to trigger a manual build
workflow_dispatch:
name: Render and deploy Book
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Install additional libraries on Linux
if: runner.os == 'Linux'
run: |
sudo apt-get update -y && sudo apt-get install -y libcurl4-openssl-dev
sudo apt-get install -y libharfbuzz-dev
sudo apt-get install -y libfribidi-dev
- uses: r-lib/actions/setup-renv@v2
- name: Install Quarto
uses: quarto-dev/quarto-actions/install-quarto@v1
# Install any computing dependency you may need, usually either python and Jupyter or R
# More specific examples will be shared on quarto-dev/quarto-actions project
- name: Install R package
run: |
R -e "install.packages('xml2')"
R -e "install.packages('downlit')"
- name: Create and populate .Renviron file
run: |
echo "RENV_CONFIG_SANDBOX_ENABLED=FALSE" >> ~/.Renviron
- name: Render book to all format
# Add any command line argument needed
run: |
quarto render
- name: Deploy 🚀
# only deploy when push to main
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4
with:
# The branch the action should deploy to.
branch: gh-pages
# The folder the action should deploy. Adapt if you changed in Quarto config
folder: _site