-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (53 loc) · 1.98 KB
/
docs-deploy.yml
File metadata and controls
58 lines (53 loc) · 1.98 KB
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
name: Deploy Docs
on:
push:
branches: [publication]
workflow_dispatch: {}
workflow_run:
workflows: ["Publish notebook"]
types:
- completed
jobs:
# https://github.com/marketplace/actions/deploy-to-github-pages
build-docs-deploy:
runs-on: ubuntu-20.04
env:
PATH_DATASETS: ${{ github.workspace }}/.datasets
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
ref: publication
- uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}-${{ hashFiles('_requirements/docs.txt') }}
restore-keys: ${{ runner.os }}-pip-
- name: Install dependencies
run: |
mkdir -p ${PATH_DATASETS}
# install Texlive, see https://linuxconfig.org/how-to-install-latex-on-ubuntu-20-04-focal-fossa-linux
sudo apt-get update
sudo apt-get install -y cmake pandoc
sudo apt-get install -y texlive-latex-extra dvipng texlive-pictures
pip --version
pip install --quiet --requirement _requirements/docs.txt
pip list
shell: bash
- name: Make Documentation
working-directory: ./_docs
run: make html --jobs $(nproc)
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.4.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages # The branch the action should deploy to.
folder: _docs/build/html # The folder the action should deploy.
clean: true # Automatically remove deleted files from the deploy branch
target-folder: docs # If you'd like to push the contents of the deployment folder into a specific directory
single-commit: true # you'd prefer to have a single commit on the deployment branch instead of full history
if: success()