This repository was archived by the owner on Jun 10, 2026. It is now read-only.
Merge pull request #227 from alphagov/dependabot/bundler/govuk_tech_d… #190
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
| name: 'Build and test' | |
| on: | |
| pull_request: | |
| branches: [ "main" ] # Run on PRs targeting main | |
| push: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| workflow_call: | |
| inputs: | |
| upload-artifact: | |
| default: false | |
| required: false | |
| type: boolean | |
| jobs: | |
| run-dependency-review: | |
| uses: ./.github/workflows/dependency-review.yaml | |
| build: | |
| needs: run-dependency-review | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version-file: '.nvmrc' | |
| - uses: ruby/setup-ruby@97ecb7b512899eb71ab1bf2310a624c6f1589ac6 # v1.308.0 | |
| with: | |
| bundler-cache: true | |
| - name: Install gems | |
| run: bundle install | |
| - name: Build | |
| run: bundle exec middleman build | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v4.1.3 | |
| if: ${{ inputs.upload-artifact }} | |
| with: | |
| name: build | |
| path: build/** | |
| retention-days: 1 |