-
Notifications
You must be signed in to change notification settings - Fork 25
81 lines (63 loc) · 1.81 KB
/
rebuild_slides.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
on:
push:
branches: [main]
pull_request:
branches: [main]
name: rebuild_slides
jobs:
build_slides:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-renv@v2
- name: Install system dependencies
run: sudo /bin/sh system_requirements.sh
- name: Cache icons
uses: actions/cache@v3
with:
path: ~/.local/share/rpkg_icon
key: ${{ runner.os }}-icons-1
- name: Download icons
run: |
library(icons)
# make sure the icons are downloaded
if (!icon_installed(fontawesome)) {
download_fontawesome()
}
shell: Rscript {0}
- name: Cache rendered html files
uses: actions/cache@v3
with:
path: ~/*.html
key: ${{ runner.os }}-html-1
- name: Build slides
run: make all
- name: Archive slides artifacts
uses: actions/upload-artifact@v3
with:
name: public
path: public
deploy_slides:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
needs: build_slides
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Download all workflow run artifacts
uses: actions/download-artifact@v3
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: public
single-commit: true