Skip to content

Add: docker_build pipeline (#1127) #1

Add: docker_build pipeline (#1127)

Add: docker_build pipeline (#1127) #1

name: documentation-build-and-publish
on:
workflow_call:
workflow_dispatch:
push:
branches: [ "main" ]
env:
DEBIAN_FRONTEND: noninteractive
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
publishGitHubPages:
name: Publish GitHub Pages
permissions:
contents: read
id-token: write
pages: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: 'ubuntu-22.04'
timeout-minutes: 20
steps:
- name: Secure the runner
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Prepare operating system for documentation build
run: |
sudo apt-get update -y && \
sudo apt-get install -y --no-install-recommends make python3 python3-pip python3-sphinx
- name: Prepare environment for documentation build
run: python3 -m pip install sphinx_book_theme myst_parser sphinxcontrib.mermaid sphinx-copybutton
- name: Build documentation
run: make -C doc/sphinx html
- name: Upload GitHub Pages artifact
uses: actions/[email protected]
with:
path: ./doc/_build/html
- name: Publish to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4