-
Notifications
You must be signed in to change notification settings - Fork 122
62 lines (56 loc) · 1.42 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
62
name: Documentation
on:
push:
branches:
- master
- maint/*
- rel/*
- docs/*
tags:
- '*'
pull_request:
workflow_dispatch:
defaults:
run:
shell: bash
# Force tox to use color
env:
FORCE_COLOR: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
docs:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python-version: '3.11'
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Build documentation
run: pipx run tox -e docs
- name: Upload docs as artifacts
uses: actions/upload-artifact@v4
with:
path: doc/_build/html
- name: Deploy (on tags)
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: doc/_build/html
force_orphan: true
user_name: "BIDS Maintenance"
user_email: bids-maintenance@gmail.com