-
Notifications
You must be signed in to change notification settings - Fork 7
40 lines (37 loc) · 1.31 KB
/
docs.yml
File metadata and controls
40 lines (37 loc) · 1.31 KB
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: Documentation
on:
pull_request:
types:
- closed
branches:
- main
- test-docs-generator # for testing
permissions:
contents: read
jobs:
update:
name: Update
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup Go
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version-file: 'go.mod'
- name: Generate documentation
run: make docs
- name: Create PR for docs update
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
with:
add-paths: docs/
branch: chore/update-docs
commit-message: "chore(docs): update documentation for #${{ github.event.number }}"
committer: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
reviewers: ${{ github.actor }}
title: Update documentation
body: "This is an automatically created PR. Changes were created by running `make docs` after merging #${{ github.event.number }} (${{ github.sha }})."
base: ${{ github.event.pull_request.base.ref }}