Skip to content

Commit e95d584

Browse files
authored
Merge pull request #4 from brianckeegan/claude/add-sphinx-documentation-gCjEm
Add GitHub Actions workflow to deploy Sphinx docs to GitHub Pages
2 parents 329ff73 + ca0db14 commit e95d584

3 files changed

Lines changed: 58 additions & 2 deletions

File tree

.github/workflows/docs.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Deploy Docs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
# Allow only one concurrent deployment, skipping runs queued between the run
15+
# in-progress and latest queued. Do not cancel in-progress runs as we want
16+
# to allow these deployments to complete.
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: false
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: Set up Python
28+
uses: actions/setup-python@v5
29+
with:
30+
python-version: "3.12"
31+
32+
- name: Install dependencies
33+
run: |
34+
python -m pip install --upgrade pip
35+
pip install -e ".[docs]"
36+
37+
- name: Build Sphinx documentation
38+
run: |
39+
cd docs
40+
make html
41+
42+
- name: Upload artifact
43+
uses: actions/upload-pages-artifact@v3
44+
with:
45+
path: docs/_build/html
46+
47+
deploy:
48+
environment:
49+
name: github-pages
50+
url: ${{ steps.deployment.outputs.page_url }}
51+
runs-on: ubuntu-latest
52+
needs: build
53+
steps:
54+
- name: Deploy to GitHub Pages
55+
id: deployment
56+
uses: actions/deploy-pages@v4

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ all_templates = reg.list_all()
9090
## Documentation
9191

9292
Full documentation including a tutorial, user guide, and API reference is
93-
available at [memeplotlib.readthedocs.io](https://memeplotlib.readthedocs.io).
93+
available at [brianckeegan.github.io/memeplotlib](https://brianckeegan.github.io/memeplotlib/).
9494

9595
To build the docs locally:
9696

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ dev = [
4949

5050
[project.urls]
5151
Homepage = "https://github.com/brianckeegan/memeplotlib"
52-
Documentation = "https://memeplotlib.readthedocs.io"
52+
Documentation = "https://brianckeegan.github.io/memeplotlib/"
5353
Repository = "https://github.com/brianckeegan/memeplotlib"
5454
Issues = "https://github.com/brianckeegan/memeplotlib/issues"
5555

0 commit comments

Comments
 (0)