generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (52 loc) · 1.42 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
name: Publish
on:
push:
branches:
- main
permissions: {}
concurrency:
group: github-pages
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
container:
image: ghcr.io/ministryofjustice/tech-docs-github-pages-publisher@sha256:aee182dd1dd86696077ea1c3512590f17ceb9f7a47aa5b16ea4f742666911dbd # v5.0.1
permissions:
contents: read
steps:
- name: Checkout
id: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Build
id: build
run: |
/usr/local/bin/package
- name: Upload Artifact
id: upload_artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: github-pages
path: artifact.tar
retention-days: 1
overwrite: true
publish:
needs: build
name: Publish
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.configure_pages.outputs.base_url }}
permissions:
contents: read
id-token: write
pages: write
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@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5