Skip to content

(cloud) Build and Deploy Docs #16

(cloud) Build and Deploy Docs

(cloud) Build and Deploy Docs #16

name: (self-hosted) Build and Deploy Docs
on:
release:
types: [published]
# creates a button
workflow_dispatch:
inputs:
logLevel:
description: "Log level"
required: true
default: "warning"
type: choice
options:
- info
- warning
- debug
jobs:
build_doc:
runs-on: [self-hosted, deepthought]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install requirements
run: |
pip install pipx
pip install nox
- name: Run Nox - generate_docs
run: |
pipx run nox --sessions generate_docs
- uses: actions/upload-pages-artifact@v3
with:
path: docs/
deploy_doc:
needs: build_doc
# only run if main branch
if: github.ref == 'refs/heads/main'
runs-on: [self-hosted, deepthought]
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4