Skip to content

Commit

Permalink
Update publish github action (#69)
Browse files Browse the repository at this point in the history
According to the `tech-docs-github-pages-publisher` documentation.
  • Loading branch information
zheileman committed Mar 1, 2024
1 parent a6ce135 commit 8c34abf
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,49 +5,51 @@ on:
push:
branches:
- "main"
paths-ignore:
- "docs/**"

# GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
permissions: {}

# Allow one concurrent deployment
concurrency:
group: "pages"
group: github-pages
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
container:
image: ministryofjustice/tech-docs-github-pages-publisher:v4.0.0
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Compile Markdown to HTML and create artifact
run: /usr/local/bin/package
- name: Upload artifact to be published
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: github-pages
path: artifact.tar
retention-days: 1
overwrite: true

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
url: ${{ steps.configure_pages.outputs.base_url }}
permissions:
contents: read
id-token: write
pages: write
steps:
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Configure Pages
id: configure_pages
uses: actions/configure-pages@1f0c5cde4bc74cd7e1254d0cb4de8d49e9068c7d # v4.0.0
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
id: deploy_pages
uses: actions/deploy-pages@decdde0ac072f6dcbe43649d82d9c635fff5b4e4 # v4.0.4

# NOTE: there are just too many, so disabling this job for now.
#
Expand Down

0 comments on commit 8c34abf

Please sign in to comment.