-
Notifications
You must be signed in to change notification settings - Fork 86
55 lines (52 loc) Β· 1.62 KB
/
documentation.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
55
name: documentation
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.7]
steps:
- name: Copy Repository Contents β©
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }} π
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies π
run: |
python -m pip install --upgrade pip
pip install mkdocs mkdocs-material mkdocstrings mkdocstrings-python mknotebooks Pygments livereload
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install .
- name: Build documentation π·ββοΈ
run: |
mkdocs build
- name: Predeploy on PR βοΈ
if: github.event_name == 'pull_request'
uses: JamesIves/[email protected]
with:
folder: site
target-folder: "predeploy"
token: ${{ secrets.DOC_ACCESS_TOKEN }}
branch: master
commit-message: "PR predeploy"
repository-name: neurolib-dev/neurolib-dev.github.io
- name: Deploy π
if: github.event_name == 'push'
uses: JamesIves/[email protected]
with:
folder: site
token: ${{ secrets.DOC_ACCESS_TOKEN }}
branch: master
repository-name: neurolib-dev/neurolib-dev.github.io