changes for readme at root of repo with tree structure #11
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 | |
- name: configure terraform-docs | |
run: | | |
curl -sSLo ./terraform-docs.tar.gz https://terraform-docs.io/dl/v0.18.0/terraform-docs-v0.18.0-$(uname)-amd64.tar.gz | |
tar -xzf terraform-docs.tar.gz | |
chmod +x terraform-docs | |
sudo mv terraform-docs /usr/bin/terraform-docs | |
rm -rf terraform-docs.tar.gz | |
terraform-docs -v | |
- name: generate terraform docs | |
run: | | |
terraform-docs markdown table -c .terraform-docs.yml --output-file README.md --recursive --output-mode inject . | |
- name: checks | |
run: | | |
ls -la | |
git status | |
rm README.md | |
- 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 |