-
Notifications
You must be signed in to change notification settings - Fork 16
46 lines (40 loc) · 1.07 KB
/
deploy_gh_pages.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
name: Build docs and trigger gh-pages
on:
push:
branches:
- "master"
pull_request:
branches:
- "master"
workflow_dispatch:
jobs:
push_gh-pages:
runs-on: ubuntu-latest
timeout-minutes: 5
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_MAIL: ${{github.event.pusher.email}}
GH_NAME: ${{github.event.pusher.name}}
DOCS_DIR: "docs"
BUILD_DIR: "build"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: |
requirements.txt
requirements-dev.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip3 install -r requirements-dev.txt
- name: Build documentation
run: ./ci/build_docs.sh
- name: Push documentation
# Deploy documentation only when on master
if: github.ref == 'refs/heads/master'
run: ./ci/push_gh_pages.sh