-
Notifications
You must be signed in to change notification settings - Fork 66
executable file
·40 lines (34 loc) · 956 Bytes
/
docs.yaml
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
on:
push:
branches:
- master
name: Generate docs
jobs:
build:
name: Release
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
id: go
- name: Generate docs
run: go run ./tools/docs/main.go
- name: Commit changes
continue-on-error: true
run: |
git config user.email "[email protected]"
git config user.name "Automated docs generator"
git checkout .
git checkout docs --
mv tmp-docs/* ./
git add *
git commit -m "Updated docs"
- name: Push changes
if: ${{ success() }}
run: |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git push