Publish Documentation #1
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: Publish Documentation | |
on: | |
workflow_call: | |
inputs: | |
artifact-name: | |
type: string | |
required: false | |
default: html-docs | |
workflow_dispatch: | |
jobs: | |
docs: | |
name: Render Docs | |
if: github.event_name == 'workflow_dispatch' | |
uses: ./.github/workflows/docs-action.yml | |
Deploy-Docs-GH-Pages: | |
name: Publish Docs to GitHub Pages | |
needs: | |
- docs | |
if: github.event_name != 'workflow_dispatch' || success() | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
permissions: | |
pages: write | |
id-token: write | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Download built docs | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: ${{ inputs.artifact-name }} | |
path: html-docs | |
- name: Upload GitHub Pages artifact | |
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 | |
with: | |
name: html-docs-pages | |
path: html-docs | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 | |
with: | |
artifact_name: html-docs-pages | |
- name: Delete GitHub Pages artifact | |
if: always() | |
uses: geekyeggo/delete-artifact@7ee91e82b4a7f3339cd8b14beace3d826a2aac39 # v5.1.0 | |
with: | |
name: html-docs-pages | |
failOnError: false | |
- name: Set Exit Status | |
if: always() | |
run: | | |
mkdir exitstatus | |
echo "${{ job.status }}" > exitstatus/${{ github.job }} | |
- name: Upload Exit Status | |
if: always() | |
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 | |
with: | |
name: exitstatus-${{ github.job }} | |
path: exitstatus | |
if-no-files-found: error |