Skip to content
This repository was archived by the owner on Jun 10, 2026. It is now read-only.

Merge pull request #228 from alphagov/dependabot/github_actions/githu… #33

Merge pull request #228 from alphagov/dependabot/github_actions/githu…

Merge pull request #228 from alphagov/dependabot/github_actions/githu… #33

name: 'Deploy to GitHub Pages'
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
run-tests:
uses: ./.github/workflows/test.yaml
with:
upload-artifact: true
deploy:
needs: run-tests
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Ruby and install gems
uses: ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f # v1.310.0
with:
ruby-version: '3'
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Build middleman site
run: bundle exec middleman build
- name: Upload artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 #v5.0.0
with:
path: "build"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0