-
Notifications
You must be signed in to change notification settings - Fork 27
65 lines (57 loc) · 2.05 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
name: docs
on:
push:
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Install dependencies 🔨 & Build 🔧
run: |
# setup mambaforge
wget -q -O Mambaforge.sh "https://github.com/conda-forge/miniforge/releases/download/4.11.0-1/Mambaforge-$(uname)-$(uname -m).sh"
bash Mambaforge.sh -b -p "${HOME}/conda" > /dev/null
source "${HOME}/conda/etc/profile.d/conda.sh"
source "${HOME}/conda/etc/profile.d/mamba.sh"
mamba activate
# load channels
$CONDA/bin/conda config --add channels bioconda
$CONDA/bin/conda config --add channels conda-forge
# install seq2science with added docs requirements
declare -a requirements=(
"graphviz>=7"
"importlib_metadata=4.11.4"
"m2r2>=0.3.3"
"networkx>=3"
"sphinx>=6"
"sphinx_rtd_theme>=1.2"
"sphinx-argparse>=0.4"
)
cp requirements.yaml doc_reqs.yaml
for pkg in "${requirements[@]}"; do
echo " - conda-forge::${pkg}" >> doc_reqs.yaml
done
mamba env create --name seq2science --file doc_reqs.yaml
rm doc_reqs.yaml
mamba activate seq2science
pip3 install .
# make the docs
python docs/scripts/schemas.py
python docs/scripts/rule_description.py
python docs/scripts/gen_dags.py
cp CHANGELOG.md docs/content
sphinx-build docs/ build -W
touch build/.nojekyll
# only deploy
- name: Deploy 📬
uses: JamesIves/github-pages-deploy-action@releases/v3
if: github.ref == 'refs/heads/master'
with:
ACCESS_TOKEN: ${{ secrets.AccessToken }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: build # The folder the action should deploy.