-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (63 loc) · 2.25 KB
/
docs.yml
File metadata and controls
79 lines (63 loc) · 2.25 KB
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: API Spec & Document Deploy
on:
workflow_run:
workflows: ["Automated version release Schedule"]
types:
- completed
jobs:
GenerateApiSpec:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code repository
id: code_checkout
uses: actions/checkout@v4
- name: Setup python environment
id: setup_python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install the required python modules
id: module_installation
run: |
python -m pip install --upgrade pip && pip install pipenv && pipenv lock && pipenv install --system --deploy && pipenv install --dev --system --deploy
- name: Get the latest tag
id: latest_tag
uses: JinoArch/get-latest-tag@latest
- name: Set latest tag in environment variable
id: set_tag
run: echo "LATEST_TAG=${{ steps.latest_tag.outputs.latestTag }}" >> $GITHUB_ENV
- name: Generate the api specification
id: api_specification
run: |
cd src/auth_service && python openapi_doc.py && cd ../main_service && python openapi_doc.py && cd ../user_service && python openapi_doc.py && cd ../..
- name: Commit the generaed changes
uses: stefanzweifel/git-auto-commit-action@v5
id: commit_changes
with:
commit_message: |
docs: api spec generation based on ${{ steps.latest_tag.outputs.latestTag }}
branch: main
DeployMkdocs:
runs-on: ubuntu-latest
permissions:
contents: write
needs: GenerateApiSpec
steps:
- name: Checkout code repository
id: code_checkout
uses: actions/checkout@v4
- name: Setup python environment
id: setup_python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install the required python modules
id: module_installation
run: |
python -m pip install --upgrade pip && pip install pipenv && pipenv lock && pipenv install --system --deploy && pipenv install --dev --system --deploy
- name: Deploy Documentation on gh-pages branch
id: deploy_mkdocs
run: |
mkdocs gh-deploy --force