Skip to content

Make home page of docs prettier #78

Make home page of docs prettier

Make home page of docs prettier #78

Workflow file for this run

name: Publish Sphinx docs to GitHub Pages
# see: https://github.com/marketplace/actions/sphinx-to-github-pages
on:
# Build the docs on pushes to main branch, PRs to main branch, and new tags.
# Publish only on demand.
push:
branches:
- main
tags:
- '*' # all tags
pull_request:
branches:
- main
workflow_dispatch: # allow manual triggering
inputs:
deploy:
description: 'Deploy documentation'
type: boolean
required: true
default: false
defaults:
run:
shell: bash -l {0}
jobs:
pages:
name: Publish documentation
runs-on: ubuntu-latest
steps:
- name: Deploy Information
if: ${{ github.event.inputs.deploy }}
run: |
echo "The docs will be published from this workflow run."
# - name: Set time zone
# run: echo "TZ=America/Chicago" >> "$GITHUB_ENV"
# - name: Sphinx build
# id: deployment
# uses: sphinx-notes/pages@v3
# with:
# documentation_path: ./docs/source
# publish: false
# python_version: "3.11"
# requirements_path: ./docs/requirements.txt
# - name: Diagnostic
# run: ls -lAFgh ${{ steps.deployment.outputs.artifact }}
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
- name: Info
run: |
echo $(pwd)
ls -lAFgh
- name: update pip
run: |
pip install --upgrade pip
- name: Install package
run: |
pip install -e .[doc] -vv
- name: Diagnostics
run: |
python -m pip list
python -c "import pyRestTable; print(f'{pyRestTable.__version__=}')"
- name: Sphinx
id: deployment
run: |
TZ=UTC make -C docs html
- name: Upload Docs ZIP file as artifact
uses: actions/upload-artifact@v4
with:
name: apsbss-docs
path: docs/build/html
- uses: peaceiris/actions-gh-pages@v4
if: ${{ github.event.inputs.deploy }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html