-
Notifications
You must be signed in to change notification settings - Fork 172
62 lines (58 loc) · 1.85 KB
/
docs.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
56
57
58
59
60
61
name: docs
on:
push:
branches:
- "master"
pull_request:
branches:
- '*' # all branches, including forks
jobs:
build_docs:
runs-on: ubuntu-latest
steps:
## Install Braindecode
- name: Checking Out Repository
uses: actions/checkout@v4
# Cache MNE Data
# The cache key here is fixed except for os
# so if you download a new mne dataset in the code, best to manually increment the key below
- name: Create/Restore MNE Data Cache
id: cache-mne_data
uses: actions/cache@v3
with:
path: ~/mne_data
key: ${{ runner.os }}-v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Show Python Version
run: python --version
# Update pip
- name: Update pip
run: pip install --upgrade pip
# Install with MOABB and docs dependencies
- name: Install with doc dependencies
run: pip install -e .[moabb,docs]
# Show Braindecode Version
- run: python -c "import braindecode; print(braindecode.__version__)"
- name: Checking Out Repository
uses: actions/checkout@v4
- name: Create Docs
run: |
cd docs
make html
- name: Upload HTML Docs as Artifacts
uses: actions/upload-artifact@v2
with:
name: HTML-Docs
path: ./docs/_build/
- name: Deploy to Github Pages if on Master
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: braindecode/braindecode.github.io
destination_dir: dev
publish_branch: master
publish_dir: ./docs/_build/html
cname: braindecode.org