-
Notifications
You must be signed in to change notification settings - Fork 2
84 lines (73 loc) · 1.97 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: docs
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
jobs:
build:
name: build and deploy docs
runs-on: windows-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2.0.0
with:
miniconda-version: "latest"
activate-environment: wood
channels: conda-forge
python-version: 3.9.10
- name: install Sphinx and nbsphinx
run: |
conda install compas
pip install -r requirements-dev.txt
pip install nbsphinx
- name: build (windows)
run: |
invoke docs
- uses: compas-dev/compas-actions.docs@v1.3.0
id: docs
with:
dest: deploy
build_to_subfolder: true
install_dependencies: false
build_docs: false
- name: Deploy docs
if: success() && steps.docs.outputs.commit_type != 'pull'
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: deploy
keep_history: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
outputs:
commit_type: ${{ steps.docs.outputs.commit_type }}
current_version: ${{ steps.docs.outputs.current_version }}
docVersions:
needs: build
if: needs.build.outputs.commit_type == 'tag'
name: update doc versions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: gh-pages
- uses: compas-dev/compas-actions.docversions@v1.3.0
with:
current_version: ${{ needs.build.outputs.current_version }}
- name: Deploy docs
if: success()
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: ./
keep_history: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}