-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (52 loc) · 1.68 KB
/
update-website.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
name: Update website
# Update on every push
on:
push:
schedule:
- cron: '0 11 4 * *'
jobs:
build:
name: Update website
runs-on: ubuntu-latest
steps:
# check-out this repository
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Set up pandoc
uses: r-lib/actions/setup-pandoc@v2
- name: Install LaTeX
shell: bash -l {0}
run: |
sudo paperconfig -p letter
sudo apt-get update -y
sudo apt-get install -y --no-install-recommends dvipng texlive-latex-base texlive-latex-extra texlive-fonts-recommended graphviz xzdec latexmk tex-gyre
- name: Install dependencies
shell: bash -l {0}
working-directory: notes
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# Check that all links work
- name: Check external links
shell: bash -l {0}
working-directory: notes
run: make linkcheck
# Build the website locally
- name: Build website
shell: bash -l {0}
working-directory: notes
run: make html
# Push to Amazon S3
- name: Upload website
uses: jakejarvis/[email protected]
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-2'
SOURCE_DIR: 'notes/build/html' # optional: defaults to entire repository