Skip to content

Commit 88bb5d1

Browse files
authored
chore(ci): fix the TfDocs creation in feature branch (#604)
* checkout pr * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * generate TF docs in release branch * reset README.md
1 parent 8d82ba0 commit 88bb5d1

File tree

2 files changed

+23
-20
lines changed

2 files changed

+23
-20
lines changed

Diff for: .github/workflows/ci.yml

-20
Original file line numberDiff line numberDiff line change
@@ -46,26 +46,6 @@ jobs:
4646
run: terraform fmt -recursive -check=true -write=false
4747
- run: terraform validate
4848

49-
docs:
50-
# update docs after merge back to main
51-
if: github.event_name == 'pull_request'
52-
name: Auto update terraform docs
53-
needs: [verify_module, verify_examples]
54-
runs-on: ubuntu-latest
55-
56-
steps:
57-
- name: CHeckout branch
58-
uses: actions/checkout@v3
59-
with:
60-
ref: ${{ github.event.pull_request.head.ref }}
61-
62-
- name: Generate TF docs
63-
uses: terraform-docs/[email protected]
64-
with:
65-
find-dir: .
66-
git-commit-message: "docs: auto update terraform docs"
67-
git-push: true
68-
6949
tfsec:
7050
name: tfsec PR commenter
7151
runs-on: ubuntu-latest

Diff for: .github/workflows/update_docs.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Update docs
2+
3+
on:
4+
push:
5+
branches:
6+
- release-please--branches--main
7+
8+
jobs:
9+
docs:
10+
# update docs after merge back to develop
11+
name: Auto update terraform docs
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout branch
16+
uses: actions/checkout@v3
17+
18+
- name: Generate TF docs
19+
uses: terraform-docs/[email protected]
20+
with:
21+
find-dir: .
22+
git-commit-message: "docs: auto update terraform docs"
23+
git-push: true

0 commit comments

Comments
 (0)