-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (35 loc) · 1.04 KB
/
deploy-web.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
name: deploy-website
# Only run when anything in the website or notebooks directories changes
on:
push:
paths:
- .github/workflows/deploy-web.yml
- nb/**
- web/**
# Install dependencies, build the book, and push it to `gh-pages` branch.
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Restore cached pip downloads
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ hashFiles('web/requirements.txt') }}
- name: pip install -r web/requirements.txt
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r web/requirements.txt
- name: Build the book
working-directory: web
run: python build.py
- name: Push the book's HTML to gh-pages branch
uses: peaceiris/actions-gh-pages@v3.6.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: web/_build/html