Skip to content

Build Docs

Build Docs #24

Workflow file for this run

name: Build Docs
on:
# Trigger on pushes to the main branch only.
# See #5 ref restricting to tags.
push:
branches: [ main ]
# Or run manually.
workflow_dispatch:
jobs:
build-and-upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install Django Sphinx myst-parser furo
pip install -e .
- name: Build docs
run: make json
working-directory: ./docs
# Refs #22: Upload an artifact containing the built docs.
- name: Upload docs
uses: actions/upload-artifact@v2
with:
# Use a name from the commit hash to avoid collisions.
name: docs-${{ github.sha }}
path: docs/build/json
- name: Get artifact details
uses: actions/github-script@v5
with:
script: |
const artifactName = "${{ steps.upload-docs.outputs.name }}"
const artifactSize = "${{ steps.upload-docs.outputs.size }}"
const artifactDownloadUrl = "${{ steps.upload-docs.outputs.artifact-url }}"
console.log(`Artifact Name: ${artifactName}`)
console.log(`Artifact Size: ${artifactSize}`)
console.log(`Artifact Download URL: ${artifactDownloadUrl}`)