-
Notifications
You must be signed in to change notification settings - Fork 8
41 lines (32 loc) · 919 Bytes
/
build-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
41
name: Build Docs
on:
push:
branches: [dev]
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.PAT }}
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.16
id: go
- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Build Binary
run: go build -v -o spc -ldflags "-X github.com/dvdmuckle/spc/cmd.version=${{ github.event.pull_request.head.sha }}" .
- name: Generate Docs
run: ./spc docs markdown docs
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update docs
file_pattern: docs/*.md