Skip to content

CI: Store HTML documentation #261

CI: Store HTML documentation

CI: Store HTML documentation #261

name: "Build and deploy documentation"
on:
push:
paths:
- doc/**
- .github/workflows/**
pull_request:
paths:
- doc/**
- .github/workflows/**
workflow_dispatch:
inputs:
perform_deploy:
description: 'Perform deploy to GitHub Pages branch'
required: true
default: false
type: boolean
jobs:
doc-build-and-deploy:
name: Build and deploy documentation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build documentation
uses: ammaraskar/[email protected]
with:
docs-folder: doc
- uses: actions/download-artifact@v4
with:
name: html_doc
path: _build/html
- name: Deploy documentation
if: ${{ github.event_name == 'workflow_dispatch' && inputs.perform_deploy }}
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: doc/_build/html