-
-
Notifications
You must be signed in to change notification settings - Fork 44
49 lines (44 loc) · 1.32 KB
/
docs.yaml
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
name: Update Docs
on:
push:
branches: [master]
jobs:
generate-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: "gh-pages"
- name: Create conda environment
run: conda create --quiet -c conda-forge --name deid
- name: Install deid
run: |
export PATH="/usr/share/miniconda/bin:$PATH"
root=$PWD
source activate deid
cd /tmp
git clone https://github.com/pydicom/deid
cd deid
pip install -e .
pip install deid-data
cd ./docs
pip install -r api_docs/docs-requirements.txt
/bin/bash ./apidoc.sh
cd ../
mv $root/.git ./docs/api_docs/.git
rm -rf $root
mv ./docs/api_docs $root
cd $root
ls -a
git add .
git status
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
git config --global pull.rebase true
if git diff-index --quiet HEAD --; then
printf "No changes\n"
else
printf "Changes\n"
git commit -a -m "Adding changed documentation files"
git push origin gh-pages || echo "up to date"
fi