fix(ci): harden auto-merge, add build validation, and post-deploy smoke test #8
This file contains hidden or 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
| # Validates that the site builds successfully and the API output is well-formed. | |
| # This should be configured as a required status check via branch protection on master. | |
| name: Validate build | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - 'master' | |
| permissions: read-all | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4 | |
| - uses: ruby/setup-ruby@d5126b9b3579e429dd52e51e68624dda2e05be25 # ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '2.7' | |
| bundler-cache: true | |
| - name: Build site | |
| run: bundle exec middleman build | |
| - name: Validate API output | |
| run: python3 scripts/validate-build.py build |