-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 1.15 KB
/
apidocs.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
name: apidocs
on:
push:
branches:
- 'master'
- 'feature/docker-ci'
jobs:
updateAPI:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '>=1.18.0'
- name: Install Ego Gen API
id: egogen
run: |
export PATH=$(go env GOPATH)/bin:$PATH
go version
go install github.com/gotomicro/ego-gen-api/cmd/[email protected]
egogen --config egogen.yaml
- name: Install ossutil
run: wget http://gosspublic.alicdn.com/ossutil/1.7.3/ossutil64 && chmod 755 ossutil64
- name: Config ossutil
run: ./ossutil64 config -e oss-cn-beijing.aliyuncs.com -i ${{ secrets.OSS_ACCESS_KEY_ID }} -k ${{ secrets.OSS_ACCESS_KEY_SECRET }}
- name: Upload docs
run: ./ossutil64 cp -r -f ./api/docs/swagger.json oss://gocn-cdn/clickvisual/api/swagger/doc.json
- name: Create Commit
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.RELEASE_TOKEN }}
delete-branch: true
commit-message: 'docs: update api docs'
title: update api docs