-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (40 loc) · 1.1 KB
/
docs.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
name: Build Docs
on: [push, pull_request]
env:
CLICOLOR_FORCE: 1
jobs:
docs:
name: Docs
runs-on: ubuntu-latest
steps:
- name: Install Golang
uses: actions/setup-go@v3
with:
go-version: 1.17.2
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install proto-gen-doc
run: go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@latest
- name: Checkout Proto
uses: actions/checkout@v3
with:
ref: next
path: proto
- name: Checkout Docs
uses: actions/checkout@v3
with:
ref: out_docs
path: out_docs
- name: Build Docs
run: protoc --doc_out=../out_docs ./*.proto
working-directory: proto
- name: Publish Docs
run: |
git config user.name github-actions
git config user.email [email protected]
git add .
(git commit -m $(date +%Y%m%d)) || true
(git push) || true
working-directory: out_docs