Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs CI #207

Merged
merged 7 commits into from
Feb 2, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/docs-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Validate Documentation

on:
pull_request:
branches: [ main ]

jobs:
docs-check:
name: Check Documentation Matches Provider Schema
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: true

- name: Install tfplugindocs
run: cd tools && go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
OmriGez marked this conversation as resolved.
Show resolved Hide resolved

- name: Generate Documentation
run: make gen-docs

- name: Check for changes in docs
run: |
DOCS_CHANGES=$(git status --porcelain docs/)
if [[ -n "$DOCS_CHANGES" ]]; then
OmriGez marked this conversation as resolved.
Show resolved Hide resolved
echo "Error: Documentation is out of sync with schema. Please run 'make gen-docs' locally and commit the changes."
echo "Changes detected in docs folder:"
echo "$DOCS_CHANGES"
OmriGez marked this conversation as resolved.
Show resolved Hide resolved
exit 1
fi
Loading