Skip to content

Commit

Permalink
🚑 Fix documentation publishing (#2788)
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Woffenden <jacob.woffenden@digital.justice.gov.uk>
  • Loading branch information
Jacob Woffenden authored Dec 20, 2023
1 parent ff10e07 commit 2c57259
Showing 1 changed file with 7 additions and 44 deletions.
51 changes: 7 additions & 44 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,50 +44,13 @@ jobs:

- name: Upload artifact
id: upload_artifact
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0

uses: actions/upload-pages-artifact@a753861a5debcf57bf8b404356158c8e1e33150c # v2.0.0
with:
name: github-pages
path: docs/artifact.tar
retention-days: 1

# htmlproofer:
# needs: [build]
# name: htmlproofer
# runs-on: ubuntu-latest
# container:
# image: ministryofjustice/tech-docs-github-pages-publisher:data-platform
# defaults:
# run:
# working-directory: docs
# steps:
# - name: Checkout
# id: checkout
# uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

# - name: Compile Markdown to HTML and run htmlproofer
# id: compile
# run: /scripts/check-url-links.sh

# linkinator:
# needs: [build]
# name: linkinator
# runs-on: ubuntu-latest
# steps:
# - name: Download artifact
# id: download_artifact
# uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
# with:
# name: github-pages
# path: github-pages

# - name: Check URLs
# id: check_urls
# run: |
# cd github-pages
# tar -xvf artifact.tar
# npm install JustinBeckwith/linkinator#e3d929bbda79d28fb46d20c04a2a6f9a9bce6f5c # v4.1.2
# npx linkinator . --recurse --markdown
# This looks unusual, but it's correct
# `uses` (https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsuses) runs in the root of the repository
# so we need to specify the full path to the compiled documentation
path: docs/docs

deploy:
if: github.ref == 'refs/heads/main'
Expand All @@ -96,7 +59,7 @@ jobs:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deploy_github_pages.outputs.page_url }}
url: ${{ steps.configure_github_pages.outputs.base_url }}
permissions:
pages: write
id-token: write
Expand All @@ -107,4 +70,4 @@ jobs:

- name: Deploy to GitHub Pages
id: deploy_github_pages
uses: actions/deploy-pages@f33f41b675f0ab2dc5a6863c9a170fe83af3571e # v4.0.0
uses: actions/deploy-pages@13b55b33dd8996121833dbc1db458c793a334630 # v3.0.1

0 comments on commit 2c57259

Please sign in to comment.