mirror of
https://github.com/pushbits/server.git
synced 2025-07-27 05:18:05 +02:00
add new pipeline for docu build
This commit is contained in:
parent
db9eaa796a
commit
f9ae7f319a
1 changed files with 29 additions and 0 deletions
29
.github/workflows/documentation.yml
vendored
Normal file
29
.github/workflows/documentation.yml
vendored
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
name: Documentation
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
- '**.yml'
|
||||||
|
- '**.jpg'
|
||||||
|
- '**.jpeg'
|
||||||
|
- '**.png'
|
||||||
|
- '**.yaml'
|
||||||
|
- '**.json'
|
||||||
|
jobs:
|
||||||
|
build_documentation:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
# TODO Activate later: if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout the repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: ${{ github.head_ref }}
|
||||||
|
- name: Install swag
|
||||||
|
run: go install github.com/swaggo/swag/cmd/swag@latest
|
||||||
|
- name: Install redoc
|
||||||
|
run: sudo apt install npm && sudo npm install redoc
|
||||||
|
- name: Build the api documentation
|
||||||
|
run: swag init --parseDependency=true -d . -g cmd/pushbits/main.go
|
||||||
|
- name: Build static html
|
||||||
|
run: npx redoc-cli bundle docs/swagger.yaml --output index.html
|
||||||
|
# TODO copy index.html to new repo
|
Loading…
Add table
Add a link
Reference in a new issue