-
Notifications
You must be signed in to change notification settings - Fork 29
60 lines (51 loc) · 1.69 KB
/
doc_build.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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Seispy docs
on:
push:
branches: [ docs ]
pull_request:
branches: [ master ]
workflow_call:
inputs:
config-path:
required: true
type: string
secrets:
token:
required: true
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
- name: Checkout
uses: actions/[email protected]
with:
ref: docs
- name: Setup Mambaforge
uses: conda-incubator/[email protected]
with:
activate-environment: docs
environment-file: environment.yml
miniforge-variant: Mambaforge
use-mamba: true
- name: Build documentation
run: |
make html
- name: Deploy documentation
uses: peaceiris/actions-gh-pages@068dc23d9710f1ba62e86896f84735d869951305
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/html
# Only keep the latest commit to avoid bloating the repository
force_orphan: true
cname: seispy.xumijian.me
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'