terraform docs resoved checkout issue #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: generate-terraform-docs | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: | |
- closed | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
generate-terraform-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: main | |
- name: Render terraform docs and push changes back to PR | |
uses: terraform-docs/gh-actions@main | |
with: | |
recursive: true | |
config-file: .terraform-docs.yml | |
output-file: README.md | |
output-method: inject | |
git-push: "true" | |
- name: Commit and Push Changes | |
run: | | |
git config user.name 'github-actions' | |
git config user.email 'actions@github.com' | |
git add . | |
git commit -m "Update documentation" | |
git push |