Skip to content

Commit

Permalink
doc: hook up sphinx
Browse files Browse the repository at this point in the history
  • Loading branch information
whot committed Nov 7, 2023
1 parent 93350c0 commit 25b9538
Show file tree
Hide file tree
Showing 5 changed files with 246 additions and 110 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Deploy to GitHub pages

on:
push:
branches: ["main"]

# Allow running this workflow manually from the Actions tab
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
runs-on: ubuntu-22.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4

- name: Install dependencies from pip
run: pip install sphinx sphinx-rtd-theme sphinx-autoapi myst-parser

- name: Build with sphinx
run: sphinx-build -M html doc/ doc/

- name: Move output to target directory
run: mv doc/html public_html/

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload pages artifact
uses: actions/upload-pages-artifact@v1
with:
path: public_html/

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = doc
BUILDDIR = build

html: Makefile
mkdir -p $(BUILDDIR)
cp -r $(SOURCEDIR)/* $(BUILDDIR)/
@$(SPHINXBUILD) -M $@ "$(BUILDDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(0)

all: html

.PHONY: help Makefile
Loading

0 comments on commit 25b9538

Please sign in to comment.