-
Notifications
You must be signed in to change notification settings - Fork 30
41 lines (39 loc) · 1.26 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@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_wrapper: false
- name: Generate documentation
run: |
terraform version
make docs
- name: Create PR for docs update
uses: peter-evans/create-pull-request@v4
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 }}