-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.16 KB
/
Copy pathci-generate-api-docs.yaml
File metadata and controls
44 lines (37 loc) · 1.16 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
name: CI - Generate API Docs
on:
push:
branches:
- main
- develop
paths:
- 'backend/api-service/**'
- '.github/workflows/ci-generate-api-docs.yaml'
workflow_dispatch:
jobs:
generate-api-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Compose
uses: docker/setup-compose-action@v1
with:
version: latest
- name: Ensure helper scripts are executable
run: chmod +x run-wait-for-services.sh
working-directory: ./scripts
- name: Generate API Docs
working-directory: ./scripts
run: |
chmod +x run-generate-api-docs.sh
./run-generate-api-docs.sh
- name: Commit and push API Docs
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add docs/api/api-docs.yaml docs/api/api-docs.html
git diff --cached --quiet || git commit -m "Update API Docs [ci skip]"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}