Merge pull request #589 from spacelift-io/recreate-stack #851
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: Check Documentation | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
check-documentation: | |
name: Check documentation | |
runs-on: ubuntu-latest | |
env: | |
GO111MODULE: on | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: { go-version-file: go.mod } | |
- name: Generate documentation | |
run: cd tools && go generate ./... | |
- name: Verify Changed files | |
uses: tj-actions/verify-changed-files@v20 | |
id: verify-changed-files | |
with: | |
files: | | |
docs | |
- name: Ensure documentation is up to date | |
if: steps.verify-changed-files.outputs.files_changed == 'true' | |
run: | | |
echo "Changes have been detected in the docs folder." | |
echo "This can happen if you haven't run 'go generate' after making a change." | |
echo "Please run go generate and commit the documentation changes to resolve this." | |
echo "Changed files: ${{ steps.verify-changed-files.outputs.changed_files }}" | |
git diff | |
exit 1 |