Skip to content

Publish GitHub Pages #234

Publish GitHub Pages

Publish GitHub Pages #234

Workflow file for this run

name: Publish
on:
workflow_dispatch:
push:
branches:
- "main"
paths-ignore:
- "docs/**"
# jobs:
# run:
# runs-on: ubuntu-latest
# container:
# image: ministryofjustice/tech-docs-github-pages-publisher:v4.0.0
# steps:
# - uses: actions/checkout@v4
# - name: Publish
# run: /usr/local/bin/package
jobs:
build:
name: Build
runs-on: ubuntu-latest
container:
image: ministryofjustice/tech-docs-github-pages-publisher:v4.0.0
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Build
run: |
/usr/local/bin/package
- name: Upload artifact to be published
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v3.1.0
with:
name: github-pages
path: artifact.tar
retention-days: 1
publish:
needs: build
name: Publish
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Configure Pages
id: configure_pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
- name: Deploy to GitHub Pages
id: deploy_pages
uses: actions/deploy-pages@decdde0ac072f6dcbe43649d82d9c635fff5b4e4 # v4.0.4