-
Notifications
You must be signed in to change notification settings - Fork 31
41 lines (39 loc) · 1.49 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
41
name: Documentation
on:
pull_request:
types:
- closed
branches:
- main
- test-docs-generator # for testing
jobs:
update:
name: Update
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: 'go.mod'
- name: Setup Terraform
uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36 # v3.0.0
with:
terraform_wrapper: false
- name: Generate documentation
run: |
terraform version
make docs
- name: Create PR for docs update
uses: peter-evans/create-pull-request@4e1beaa7521e8b457b572c090b25bd3db56bf1c5 # v5.0.3
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: "chore(docs): update documentation for #${{ github.event.number }}"
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 }}