-
Notifications
You must be signed in to change notification settings - Fork 108
53 lines (53 loc) · 1.62 KB
/
build_site.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
name: Build website
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
Build-website:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Adds keys to work with other repositories used in this lesson (e.g., UCL/github-example)
- uses: webfactory/ssh-agent@v0.5.4
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: actions/cache@v2 # FIXME: add apt(latex)
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
restore-keys: |
${{ runner.os }}-gems-
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '.github/python/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install TeXLive
uses: DanySK/setup-texlive-action@0.1.1
- id: setup-python
name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
uses: py-actions/py-dependency-install@v2
with:
path: ".github/python/requirements.txt"
- name: Building notes
run: make ready
- name: Builds website
uses: helaili/jekyll-action@v2
with:
target_branch: 'gh-pages'
build_only: true
- name: Build website and deploy
if: github.ref == 'refs/heads/main'
uses: helaili/jekyll-action@v2
with:
target_branch: 'gh-pages'
token: ${{ secrets.GITHUB_TOKEN }}