-
Notifications
You must be signed in to change notification settings - Fork 4
47 lines (38 loc) · 1.15 KB
/
build_deploy_doc.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
name: Build & Deploy Doc
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
# * is a special character in YAML so you have to quote this string
# at 4 am
- cron: '0 4 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
# avoid failure on git push
# see https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-first-deployment-with-github_token
#permissions:
# contents: write
steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v3
# https://github.com/actions/setup-python
- uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install
run: |
curl -sSL https://install.python-poetry.org | python3 -
poetry install --all-extras --without lint,test
- name: Make
run: poetry run make -C docs html
- name: Deploy
if: ${{ github.ref == 'refs/heads/main' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html