Skip to content

Commit 8c734f5

Browse files
committed
ci(docs): add action for auto-generating the documentation
1 parent 00a3942 commit 8c734f5

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/docs.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Documentation
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
branches:
8+
- main
9+
- test-docs-generator # for testing
10+
11+
jobs:
12+
update:
13+
name: Update
14+
if: github.event.pull_request.merged == true
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Setup Go
18+
uses: actions/setup-go@v2
19+
with:
20+
go-version: "1.17"
21+
- name: Checkout
22+
uses: actions/checkout@v2
23+
- name: Generate documentation
24+
run: make generate
25+
- name: Create PR for docs update
26+
uses: peter-evans/create-pull-request@v4
27+
with:
28+
add-paths: docs/
29+
branch: chore/update-docs
30+
commit-message: "chore(docs): update documentation for #${{ github.event.number }}"
31+
committer: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
32+
reviewers: ${{ github.actor }}
33+
title: Update documentation
34+
body: "This is an automatically created PR. Changes were created by running `make docs` after merging #${{ github.event.number }} (${{ github.sha }})."
35+
base: ${{ github.event.pull_request.base.ref }}

0 commit comments

Comments
 (0)