-
Notifications
You must be signed in to change notification settings - Fork 5
124 lines (101 loc) · 3.79 KB
/
generate_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
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: Generating Documentation
on:
push:
branches:
- main
permissions:
contents: write
jobs:
check_generate_other_formats:
runs-on: ubuntu-latest
steps:
- name: Check if 'generate_other_formats' workflow is running
id: check_status
run: |
generate_workflow_id=$(gh api -X GET /repos/${{ github.repository }}/actions/workflows/generate_other_formats.yaml/runs \
--jq '.workflow_runs[] | select(.status == "in_progress") | .id')
echo "workflow_id=$generate_workflow_id" >> $GITHUB_ENV
wait_for_generate_other_formats:
needs: check_generate_other_formats
runs-on: ubuntu-latest
if: env.workflow_id != ''
steps:
- name: Wait for 'generate_other_formats' to complete
run: |
while [[ "$(gh api -X GET /repos/${{ github.repository }}/actions/runs/$generate_workflow_id --jq '.status')" != "completed" ]]; do
echo "Waiting for generate_other_formats workflow to complete..."
sleep 30
done
generate:
needs: [check_generate_other_formats, wait_for_generate_other_formats]
runs-on: ubuntu-latest
steps:
- name: Checkout this repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install the required python packages
run: python -m pip install .[docs]
- name: Other installations
run: |
sudo apt-get update
sudo apt-get install -y build-essential git wget curl
- name: Create local docs
run: |
mkdir docs
cp -r src/docs/* docs/
touch docs/.nojekyll
cp erdiagram-autogen/ansrs.md docs/ansrs.md
cp erdiagram-autogen/genome_annotation.md docs/genome_annotation.md
cp erdiagram-autogen/library_generation.md docs/library_generation.md
gen-doc -d docs linkml-schema/library_generation.yaml
mv docs/index.md docs/index_library_generation.md
gen-doc -d docs linkml-schema/ansrs.yaml
mv docs/index.md docs/index_ansrs.md
gen-doc -d docs linkml-schema/genome_annotation.yaml
mv docs/index.md docs/index_genome_annotation.md
mv docs/index_main.md docs/index.md
- name: Deploy to GitHub Pages
run: mkdocs gh-deploy --force
# name: generating documentation
# on:
# push:
# branches:
# - main
# permissions:
# contents: write
# jobs:
# generate:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout this repository
# uses: actions/checkout@v3
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: 3.9
# - name: Install the required python packages
# run: python -m pip install .[docs]
# - name: Other installations
# run: |
# sudo apt-get update
# sudo apt-get install -y build-essential git wget curl
# - name: Create local docs
# run: |
# mkdir docs
# cp -r src/docs/* docs/
# touch docs/.nojekyll
# cp erdiagram-autogen/ansrs.md docs/ansrs.md
# cp erdiagram-autogen/genome_annotation.md docs/genome_annotation.md
# cp erdiagram-autogen/library_generation.md docs/library_generation.md
# gen-doc -d docs linkml-schema/library_generation.yaml
# mv docs/index.md docs/index_library_generation.md
# gen-doc -d docs linkml-schema/ansrs.yaml
# mv docs/index.md docs/index_ansrs.md
# gen-doc -d docs linkml-schema/genome_annotation.yaml
# mv docs/index.md docs/index_genome_annotation.md
# mv docs/index_main.md docs/index.md
# - name: Deploy to GitHub Pages
# run: mkdocs gh-deploy --force