-
Notifications
You must be signed in to change notification settings - Fork 123
60 lines (58 loc) · 1.82 KB
/
deploy-pages.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
on:
push:
branches:
- master
# kill any builds still running from older commits
concurrency:
group: deploy-pages
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- name: Use Node.js
uses: actions/setup-node@v2-beta
with:
node-version: '14'
- name: Install pandoc
run: |
URL="https://github.com/jgm/pandoc/releases/download/2.14.0.1/pandoc-2.14.0.1-1-amd64.deb"
wget $URL -O /tmp/pandoc.deb
sudo dpkg -i /tmp/pandoc.deb
# The above script adapted from https://gist.github.com/rossant/8b751a15d71d6d9403a8
- name: Install TeX Live and Inkscape
run: |
sudo apt-get update -y
sudo apt-get install -y texlive texlive-fonts-extra latexmk
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Fetch Yarn dependencies
run: |
yarn install
- name: Build
run: |
set -euxo pipefail
yarn run pdf || (cat latex_pdf/sicpjs.log && false)
yarn run split
yarn run js
yarn run json
- name: Package
run: |
yarn run prepare
find docs_out -name .gitignore -delete -print
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs_out
cname: sicp.sourceacademy.org
force_orphan: true