-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (58 loc) · 1.83 KB
/
build_docs.yml
File metadata and controls
60 lines (58 loc) · 1.83 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
59
60
name: Build Documentation
on:
push:
branches: [ sources ]
pull_request:
branches: [ sources ]
schedule:
- cron: "0 0 * * */6"
jobs:
build_docs:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
with:
submodules: "recursive" # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Cache conda
uses: actions/cache@v1
env:
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('symedocs.yml') }}
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('symedocs.yml') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: symedocs
environment-file: symedocs.yml
python-version: 3.9
auto-activate-base: false
- name: Build
run: sphinx-build docs ./public
- name: Deploy Docs
if: ${{ github.ref == 'refs/heads/sources' && github.repository == 'Symengine/symengine.github.io' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./public
- name: Deploy Notebooks
if: ${{ github.ref == 'refs/heads/sources' && github.repository == 'Symengine/symengine.github.io' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: notebooks
publish_dir: ./notebooks