-
Notifications
You must be signed in to change notification settings - Fork 4
73 lines (60 loc) · 1.86 KB
/
publish.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
on:
workflow_dispatch:
push:
branches: [main]
name: Publish examples
jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Install dev packages
run: sudo apt-get install -y pandoc
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Install R
uses: r-lib/actions/setup-r@v2
with:
r-version: "release"
- name: Set up Pandoc
uses: r-lib/actions/setup-pandoc@v2
- name: Install R Dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache: true
cache-version: 2
- name: Render book
uses: quarto-dev/quarto-actions/render@v2
with:
path: "examples/book"
- name: Render website
uses: quarto-dev/quarto-actions/render@v2
with:
path: "examples/website"
- name: Render example document
uses: quarto-dev/quarto-actions/render@v2
with:
path: "examples/document/bookup.qmd"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Render dark example document
uses: quarto-dev/quarto-actions/render@v2
with:
path: "examples/document/bookup-dark.qmd"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Copy examples
run: |
mkdir gh_root && \
cp -rp examples/book/_book gh_root/book && \
cp -rp examples/website/_site gh_root/website && \
cp -p examples/document/bookup.html gh_root/ && \
cp -p examples/document/bookup-dark.html gh_root/
- name: Deploy book
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: gh_root
token: ${{ secrets.GITHUB_TOKEN }}