-
Notifications
You must be signed in to change notification settings - Fork 1
79 lines (68 loc) · 2.02 KB
/
main.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
name: main
on:
# build on all PRs, but only trigger push builds on `main`
pull_request:
push:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: lint
uses: github/super-linter@v4
env:
VALIDATE_ALL_CODEBASE: true
VALIDATE_JSCPD: false
DEFAULT_BRANCH: main
doc-build:
needs: lint
runs-on: ubuntu-latest
steps:
- name: checkout source
uses: actions/checkout@v2
- name: setup miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.8
- name: install latest QIIME 2 core distro (staging)
run: |
envFile=qiime2-latest-py38-linux-conda.yml
wget https://raw.githubusercontent.com/qiime2/environment-files/master/latest/staging/$envFile
conda env create -q -p ./test-env --file $envFile
- name: install dependencies
run: |
conda install -p ./test-env -q -y \
-c conda-forge \
-c bioconda \
-c defaults \
--override-channels pip
- name: install pip dependencies
shell: bash -l {0}
run: |
conda activate ./test-env
pip install -r book/requirements.txt
- name: build book preview
shell: bash -l {0}
run: |
conda activate ./test-env
make build_preview
- name: build full book
shell: bash -l {0}
env:
Q2DOC_HTML_BASEURL: https://docs.qiime2.org/jupyterbooks/cancer-microbiome-intervention-tutorial/
run: |
conda activate ./test-env
make build_full
- name: deploy to docs
uses: burnett01/[email protected]
if: ${{ github.ref == 'refs/heads/main' }}
with:
switches: -avzr --delete
path: book/_build/html/
remote_path: ${{ secrets.STATIC_SITE_WWW }}
remote_host: ${{ secrets.STATIC_SITE_HOST }}
remote_user: ${{ secrets.STATIC_SITE_USER }}
remote_key: ${{ secrets.STATIC_SITE_PEM }}