Skip to content

Commit 3953e3f

Browse files
committed
condition to deploy upon PR
1 parent 6942139 commit 3953e3f

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/docs.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Build Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
release:
8+
9+
pull_request:
10+
branches:
11+
- main
12+
13+
14+
jobs:
15+
test:
16+
runs-on: ubuntu-latest
17+
defaults:
18+
run:
19+
shell: bash -l {0}
20+
steps:
21+
- uses: actions/checkout@v3
22+
with:
23+
fetch-depth: 0
24+
25+
- uses: conda-incubator/setup-miniconda@v2
26+
with:
27+
activate-environment: build
28+
auto-update-conda: true
29+
30+
- name: install requirements
31+
run: >-
32+
conda install -n build -c conda-forge
33+
--file requirements/build.txt
34+
--file requirements/run.txt
35+
--file requirements/docs.txt
36+
--quiet --yes
37+
38+
- name: install the package
39+
run: python -m pip install . --no-deps
40+
41+
- name: build documents
42+
run: make -C doc/manual html
43+
44+
- name: Deploy
45+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
46+
uses: peaceiris/actions-gh-pages@v3
47+
with:
48+
github_token: ${{ secrets.GITHUB_TOKEN }}
49+
publish_dir: ./doc/manual/build/html

0 commit comments

Comments
 (0)