Skip to content

Fix broken link

Fix broken link #4

Workflow file for this run

##########################################################################################
# DESCRIPTION: Generate Sphinx and pushes them to Git Pages.
# AUTHOR: W. Li
# VERSION: 1.0
# CREATED: 5/23/2024
#
# References:
# * https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-pythonCommon
#
##########################################################################################
name: sphinx
on:
push:
branches: ["main"]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
##########################################################################################
# Jobs
##########################################################################################
jobs:
########################################################################################
# Build the static HTML files we want to publish.
########################################################################################
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
# Checkout the source repo
- name: Checkout source
uses: actions/checkout@v4
# Setup the environment with specified python version
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
token: ${{ secrets.GH_GITHUB_COM_TOKEN }}
python-version: "3.10"
# Setup Homebrew
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Install Homebrew packages
run: brew install allure
# Install poetry and disable virtual environments
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: false
virtualenvs-in-project: false
installer-parallel: true
# Install nox
- name: Install dependencies
run: |
pip install nox
# Use nox to generate the document
- name: Generate Sphinx artifacts
run: |
export PYTHONPATH=${{ github.workspace }}
nox -r -s build
# Upload the artifact to the next job
- name: Upload Sphinx artifact
uses: actions/upload-artifact@v4
with:
name: Sphinx artifact
path: docs/build/html/
########################################################################################
# Deploy the static HTML files to Github Pages.
########################################################################################
deploy:
needs: [build]
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
# We first need to checkout the repo for the code.
- name: Checkout
uses: actions/checkout@v4
# Now download the artifact from the previous build for Sphinx.
- name: Download Sphinx artifact
uses: actions/download-artifact@v4
with:
name: Sphinx artifact
path: docs/build/html/
# Note: Github pages expects all of your HTML static files to reside in docs/
- name: Display structure of downloaded files
run: ls -al
working-directory: docs/build/html/
# We are now ready to upload the artifact folder to Github pages.
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/build/html/
# Once the upload is complete we can deploy
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4