Skip to content

Merge pull request #126 from alphagov/clean-up-migration-to-github-pages #3

Merge pull request #126 from alphagov/clean-up-migration-to-github-pages

Merge pull request #126 from alphagov/clean-up-migration-to-github-pages #3

Workflow file for this run

---
name: Deploy to GitHub Pages
on:
push:
branches:
- main
workflow_dispatch:
permissions:
pages: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Set commit message up front
id: commit_message_writer
run: echo "::set-output name=commit_message::Deploy via merge"
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Setup Node
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65
- name: Setup Ruby
uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42
with:
bundler-cache: true
- name: Build middleman site
run: bundle exec middleman build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
cname: guidance.data.gov.uk
allow_empty_commit: true
commit_message: ${{steps.commit_message_writer.outputs.commit_message}}