Skip to content

Commit

Permalink
Add a github workflow to check that docs are up to date
Browse files Browse the repository at this point in the history
  • Loading branch information
fantapop committed May 3, 2024
1 parent ffb857a commit 7a41c89
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,26 @@ jobs:

- name: Build terraform-provider
run: make install

docs-check:
name: docs-generated-check
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Build docs
run: make generate

- name: Check changed files
id: changed-files
run: |
changed_files=$(git diff --name-only | xargs)
if [ "${#changed_files}" -gt "0" ]; then
echo "Unexpected changes found in the repo, did you remember to run \`make generate\`?" > $GITHUB_STEP_SUMMARY
echo "Changed files:" >> $GITHUB_STEP_SUMMARY
for file in ${changed_files}; do
echo "\`$file\`" >> $GITHUB_STEP_SUMMARY
done
exit 1
fi

0 comments on commit 7a41c89

Please sign in to comment.