-
-
Notifications
You must be signed in to change notification settings - Fork 3
33 lines (29 loc) · 907 Bytes
/
tf-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
name: Terraform Docs
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
tf-docs:
name: Generate Terraform Docs
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Begin CI...
uses: actions/checkout@v4
with:
# If the event that triggered the workflow is a pull request, then the variable contains ${{ github.event.pull_request.head.ref }}
# If the event that triggered the workflow is a push, then the variable contains ${{ github.ref }}
ref: ${{ github.event.pull_request.head.ref || github.ref }}
- name: Render terraform docs inside modules
uses: terraform-docs/[email protected]
with:
working-dir: modules/*,live/*
output-file: docs/MODULE.md
output-method: replace
git-push: "true"