ci: switch back to using v5 of the dagger action #61
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: docs | |
on: | |
pull_request: | |
paths: | |
- "docs/**" | |
- "mkdocs.yml" | |
push: | |
branches: | |
- main | |
tags: | |
- "v*.*.*" | |
paths: | |
- "docs/**" | |
- "mkdocs.yml" | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
build-docs: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: GHCR Login | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GH_GHCR }} | |
- run: docker pull ghcr.io/purpleclay/mkdocs-material-insiders:${{ vars.MKDOCS_MATERIAL_INSIDERS_VERSION }} | |
- name: Build | |
run: docker run --rm -i -v ${PWD}:/docs ghcr.io/purpleclay/mkdocs-material-insiders:${{ vars.MKDOCS_MATERIAL_INSIDERS_VERSION }} build | |
env: | |
CI: true | |
- name: HTML Test | |
uses: wjdp/htmltest-action@master | |
with: | |
path: site | |
config: htmltest.yaml | |
- name: Patch mkdocs.yml Site URL | |
if: ${{ startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'workflow_dispatch') }} | |
uses: jacobtomlinson/gha-find-replace@v3 | |
with: | |
find: 'site_url: ""' | |
replace: 'site_url: "https://docs.purpleclay.dev/${{ github.event.repository.name }}/"' | |
regex: false | |
include: mkdocs.yml | |
- name: Patch mkdocs.yml Edit URI | |
if: ${{ startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'workflow_dispatch') }} | |
uses: jacobtomlinson/gha-find-replace@v3 | |
with: | |
find: 'edit_uri: ""' | |
replace: 'edit_uri: "edit/main/docs"' | |
regex: false | |
include: mkdocs.yml | |
- name: Deploy documentation | |
if: ${{ startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'workflow_dispatch') }} | |
run: docker run --rm -i -v ${PWD}:/docs ghcr.io/purpleclay/mkdocs-material-insiders:${{ vars.MKDOCS_MATERIAL_INSIDERS_VERSION }} gh-deploy --force | |
env: | |
CI: true |