[ac138c]: / .github / workflows / docs.yml

Download this file

62 lines (59 with data), 1.9 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
61
name: docs
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
cancel-in-progress: true
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
# Install python with caching pip dependencies
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip' # caching pip dependencies
# Cache MNE Data
- name: Create/Restore MNE Data Cache
id: cache-mne_data
uses: actions/cache@v4
with:
path: ~/mne_data
key: ${{ runner.os }}-mne-data-v1-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-mne-data-v1-
# 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,bids]
# Show Braindecode Version
- run: python -c "import braindecode; print(braindecode.__version__)"
- name: Create Docs
run: |
cd docs
make html
- name: Upload HTML Docs as Artifacts
uses: actions/upload-artifact@v4
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