Skip to content

Commit

Permalink
Merge pull request #125 from nimalank7/add-pipeline-to-deploy-to-gith…
Browse files Browse the repository at this point in the history
…ub-pages

Add GitHub Actions pipeline to deploy to GitHub pages
  • Loading branch information
nimalank7 authored Nov 27, 2023
2 parents 2dd9493 + 85feab0 commit 781ec59
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
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}}

0 comments on commit 781ec59

Please sign in to comment.