-
Notifications
You must be signed in to change notification settings - Fork 11
41 lines (35 loc) · 987 Bytes
/
mkdocs.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
name: Documentation
on:
push:
branches:
- "main"
jobs:
mkdocs:
name: Build & Deploy Documentation
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
- name: Cache Go Dependencies
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Generate swagger files
run: |
go install github.com/swaggo/swag/cmd/swag@latest
swag init -g internal/api/api.go
- name: Deploy Documentation
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONFIG_FILE: mkdocs.yml
REQUIREMENTS: requirements.txt