Skip to content

Commit f8d6874

Browse files
chrisguidryclaude
andcommitted
Migrate docs hosting from GitHub Pages to ReadTheDocs
The docs CI workflow fails on fork PRs because GitHub restricts the `GITHUB_TOKEN` to read-only, and the `marocchino/sticky-pull-request-comment` step can't post. Rather than patching around that, this switches docs hosting to ReadTheDocs Community, which has built-in PR preview builds that work for fork PRs automatically. Changes: - Add `.readthedocs.yaml` with custom build commands for Zensical - Add `site_url: https://docket.lol/` to `mkdocs.yml` - Simplify `docs.yml` to a build-check-only workflow (no publish job, no sticky comment, minimal permissions) - Update all doc URLs in README to `docket.lol` After merge: import project on readthedocs.org, set up Porkbun ALIAS record for `docket.lol`, configure custom domain in RTD settings, and delete the `github-pages` environment from the repo. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent dee3b0a commit f8d6874

File tree

4 files changed

+17
-62
lines changed

4 files changed

+17
-62
lines changed

.github/workflows/docs.yml

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ on:
99
- main
1010

1111
permissions:
12-
actions: write
1312
contents: read
14-
pages: write
15-
id-token: write
16-
pull-requests: write
1713

1814
concurrency:
1915
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -40,56 +36,3 @@ jobs:
4036

4137
- name: Build documentation
4238
run: uv run zensical build
43-
44-
- name: Upload artifact
45-
uses: actions/upload-artifact@v6
46-
id: docs-artifact
47-
with:
48-
name: documentation
49-
path: site/
50-
51-
- name: Add or Update Comment
52-
if: github.event_name == 'pull_request'
53-
uses: marocchino/sticky-pull-request-comment@v2
54-
with:
55-
header: preview
56-
message: |
57-
📚 Documentation has been built for this PR!
58-
59-
You can download the documentation directly here:
60-
${{ steps.docs-artifact.outputs.artifact-url }}
61-
62-
publish:
63-
needs: build
64-
if: github.ref == 'refs/heads/main'
65-
runs-on: ubuntu-latest
66-
timeout-minutes: 10
67-
environment:
68-
name: github-pages
69-
url: ${{ steps.deployment.outputs.page_url }}
70-
steps:
71-
- name: Download artifact
72-
uses: actions/download-artifact@v7
73-
with:
74-
name: documentation
75-
path: site
76-
77-
- name: Setup Pages
78-
uses: actions/configure-pages@v5
79-
80-
# Clean up any stale github-pages artifacts from previous attempts
81-
# See: https://github.com/actions/upload-pages-artifact/issues/97
82-
- name: Delete stale Pages artifacts
83-
uses: geekyeggo/delete-artifact@v5
84-
with:
85-
name: github-pages
86-
failOnError: false
87-
88-
- name: Upload Pages artifact
89-
uses: actions/upload-pages-artifact@v4
90-
with:
91-
path: site
92-
93-
- name: Deploy to GitHub Pages
94-
id: deployment
95-
uses: actions/deploy-pages@v4

.readthedocs.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
build:
3+
os: ubuntu-24.04
4+
tools:
5+
python: "3.12"
6+
commands:
7+
- pip install uv
8+
- uv sync --group docs
9+
- uv run zensical build
10+
- mkdir -p $READTHEDOCS_OUTPUT/html
11+
- cp -r site/* $READTHEDOCS_OUTPUT/html/

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on the scheduling of future work as seamlessly and efficiently as immediate work
66
[![GitHub main checks](https://img.shields.io/github/check-runs/chrisguidry/docket/main)](https://github.com/chrisguidry/docket/actions/workflows/ci.yml)
77
[![Codecov](https://img.shields.io/codecov/c/github/chrisguidry/docket)](https://app.codecov.io/gh/chrisguidry/docket)
88
[![PyPI - License](https://img.shields.io/pypi/l/pydocket)](https://github.com/chrisguidry/docket/blob/main/LICENSE)
9-
[![Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://chrisguidry.github.io/docket/)
9+
[![Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://docket.lol/)
1010

1111
## At a glance
1212

@@ -42,9 +42,9 @@ Hello, Jane at 2025-03-05 13:58:21.552644!
4242
Howdy, John at 2025-03-05 13:58:24.550773!
4343
```
4444

45-
Check out our docs for more [details](http://chrisguidry.github.io/docket/),
46-
[examples](https://chrisguidry.github.io/docket/getting-started/), and the [API
47-
reference](https://chrisguidry.github.io/docket/api-reference/).
45+
Check out our docs for more [details](https://docket.lol/),
46+
[examples](https://docket.lol/getting-started/), and the [API
47+
reference](https://docket.lol/api-reference/).
4848

4949
## Why `docket`?
5050

@@ -98,7 +98,7 @@ async with Docket(name="my-docket", url="memory://my-docket") as docket:
9898
...
9999
```
100100

101-
See [Testing with Docket](https://chrisguidry.github.io/docket/testing/#using-in-memory-backend-no-redis-required) for more details.
101+
See [Testing with Docket](https://docket.lol/testing/#using-in-memory-backend-no-redis-required) for more details.
102102

103103
# Hacking on `docket`
104104

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
site_name: docket
22
site_description: A distributed background task system for Python
3+
site_url: https://docket.lol/
34
repo_url: https://github.com/chrisguidry/docket
45
repo_name: chrisguidry/docket
56

0 commit comments

Comments
 (0)