forked from pynapple-org/pynapple
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (39 loc) · 1.12 KB
/
documentation.yml
File metadata and controls
44 lines (39 loc) · 1.12 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
name: documentation
on:
push:
branches: [ main ]
pull_request:
branches: [ main]
workflow_dispatch:
branches: [ main]
permissions:
contents: write
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# this is necessary for setuptools_scm to work properly with github
# actions, see https://github.com/pypa/setuptools_scm/issues/480 and
# https://stackoverflow.com/a/68959339
with:
fetch-depth: 0
tags: true
# Ensure all tags are present
- run: git fetch --tags
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[doc]
- name: Sphinx build
run: |
sphinx-build doc _build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true