common-python-tasks 0.12.0__tar.gz → 0.13.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/PKG-INFO +7 -7
  2. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/README.md +6 -6
  3. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/configuration.md +1 -1
  4. common_python_tasks-0.13.0/docs/documentation-workflows.md +183 -0
  5. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/container-images.md +13 -2
  6. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/reference/build-deps-image.md +2 -2
  7. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/reference/build-image.md +2 -2
  8. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/src/common_python_tasks/data/dockerfile_extensions/docker-in-docker/supervisor.sh +3 -2
  9. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/src/common_python_tasks/docker.py +12 -12
  10. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/src/common_python_tasks/env.py +19 -16
  11. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/src/common_python_tasks/tasks.py +23 -23
  12. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/zensical.toml +8 -1
  13. common_python_tasks-0.12.0/docs/documentation-workflows.md +0 -104
  14. common_python_tasks-0.12.0/src/common_python_tasks/data/dockerfile_extensions/.gitkeep +0 -0
  15. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/.gitignore +0 -0
  16. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/.poetry/plugins/poetry_dynamic_versioning-1.10.0.dist-info/licenses/LICENSE +0 -0
  17. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/.poetry/plugins/poetry_plugin_export-1.10.0.dist-info/licenses/LICENSE +0 -0
  18. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/LICENSE +0 -0
  19. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/getting-started.md +0 -0
  20. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/index.md +0 -0
  21. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/daily-development.md +0 -0
  22. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/development-stacks.md +0 -0
  23. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/documentation.md +0 -0
  24. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/index.md +0 -0
  25. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/packaging-and-releases.md +0 -0
  26. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/reference/build-package.md +0 -0
  27. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/reference/build.md +0 -0
  28. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/reference/bump-version.md +0 -0
  29. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/reference/changelog.md +0 -0
  30. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/reference/clean.md +0 -0
  31. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/reference/container-shell.md +0 -0
  32. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/reference/db-shell.md +0 -0
  33. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/reference/docs-build.md +0 -0
  34. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/reference/docs-serve.md +0 -0
  35. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/reference/format.md +0 -0
  36. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/reference/lint.md +0 -0
  37. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/reference/publish-github-release.md +0 -0
  38. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/reference/publish-package.md +0 -0
  39. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/reference/push-image.md +0 -0
  40. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/reference/release.md +0 -0
  41. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/reference/reset-db.md +0 -0
  42. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/reference/run-container.md +0 -0
  43. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/reference/run-db-migrations.md +0 -0
  44. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/reference/stack-down.md +0 -0
  45. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/reference/stack-up.md +0 -0
  46. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/reference/test.md +0 -0
  47. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/docs/tasks/reference/update-dependencies.md +0 -0
  48. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/pyproject.toml +0 -0
  49. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/scripts/__init__.py +0 -0
  50. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/scripts/add_common_python_tasks.py +0 -0
  51. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/scripts/docs_tasks_reference.py +0 -0
  52. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/scripts/release_script.py +0 -0
  53. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/scripts/update_docs_tasks_reference.py +0 -0
  54. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/scripts/utils.py +0 -0
  55. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/src/common_python_tasks/__init__.py +0 -0
  56. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/src/common_python_tasks/__main__.py +0 -0
  57. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/src/common_python_tasks/data/dockerfile_extensions/docker-in-docker/Dockerfile +0 -0
  58. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/src/common_python_tasks/data/dockerfile_extensions/docker-in-docker/install.sh +0 -0
  59. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/src/common_python_tasks/data/fastapi/alembic.ini.j2 +0 -0
  60. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/src/common_python_tasks/data/fastapi/compose-base.yml.j2 +0 -0
  61. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/src/common_python_tasks/data/fastapi/compose-db-debug.yml.j2 +0 -0
  62. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/src/common_python_tasks/data/fastapi/compose-db.yml.j2 +0 -0
  63. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/src/common_python_tasks/data/fastapi/compose-debug.yml.j2 +0 -0
  64. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/src/common_python_tasks/data/generic/.coveragerc +0 -0
  65. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/src/common_python_tasks/data/generic/.dockerignore +0 -0
  66. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/src/common_python_tasks/data/generic/Dockerfile.deps.j2 +0 -0
  67. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/src/common_python_tasks/data/generic/Dockerfile.j2 +0 -0
  68. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/src/common_python_tasks/data/generic/cliff.toml +0 -0
  69. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/src/common_python_tasks/data/generic/pytest.ini +0 -0
  70. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/src/common_python_tasks/data/generic/ruff.toml +0 -0
  71. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/src/common_python_tasks/docker_compose.py +0 -0
  72. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/src/common_python_tasks/git.py +0 -0
  73. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/src/common_python_tasks/github.py +0 -0
  74. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/src/common_python_tasks/project.py +0 -0
  75. {common_python_tasks-0.12.0 → common_python_tasks-0.13.0}/src/common_python_tasks/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: common-python-tasks
3
- Version: 0.12.0
3
+ Version: 0.13.0
4
4
  Summary: Opinionated Poe the Poet tasks for Python package development.
5
5
  Project-URL: Homepage, http://github.com/ci-sourcerer/common-python-tasks
6
6
  Project-URL: Source, http://github.com/ci-sourcerer/common-python-tasks.git
@@ -35,14 +35,14 @@ Description-Content-Type: text/markdown
35
35
 
36
36
  `common-python-tasks` provides reusable, opinionated [Poe the Poet](https://poethepoet.natn.io/guides/packaged_tasks.html) tasks for Python development, packaging, releases, containers, and documentation.
37
37
 
38
- Read the [complete documentation](https://ci-sourcerer.github.io/common-python-tasks/) for the task reference, configuration options, and deployment guidance.
38
+ Read the [complete documentation](https://common-python-tasks.ci-sourcerer.com/) for the task reference, configuration options, and deployment guidance.
39
39
 
40
40
  ## Quick start
41
41
 
42
42
  Add the package as a development dependency.
43
43
 
44
44
  ```shell
45
- uv add --dev common-python-tasks==0.12.0
45
+ uv add --dev common-python-tasks==0.13.0
46
46
  ```
47
47
 
48
48
  Expose the default task set in `pyproject.toml`.
@@ -83,12 +83,12 @@ poe docs-build
83
83
  poe docs-serve
84
84
  ```
85
85
 
86
- The [documentation workflow guide](https://ci-sourcerer.github.io/common-python-tasks/documentation-workflows/) covers GitHub Actions artifacts, optional Cloudflare Pages previews, and GitHub Pages deployment.
86
+ The [documentation workflow guide](https://common-python-tasks.ci-sourcerer.com/documentation-workflows/) covers GitHub Actions artifacts, optional Cloudflare Pages previews, and GitHub Pages deployment.
87
87
 
88
88
  ## Learn more
89
89
 
90
- - [Getting started](https://ci-sourcerer.github.io/common-python-tasks/getting-started/)
91
- - [Task reference](https://ci-sourcerer.github.io/common-python-tasks/tasks/)
92
- - [Configuration reference](https://ci-sourcerer.github.io/common-python-tasks/configuration/)
90
+ - [Getting started](https://common-python-tasks.ci-sourcerer.com/getting-started/)
91
+ - [Task reference](https://common-python-tasks.ci-sourcerer.com/tasks/)
92
+ - [Configuration reference](https://common-python-tasks.ci-sourcerer.com/configuration/)
93
93
 
94
94
  The project is in alpha, so minor releases may contain breaking changes. It is distributed under the [MIT license](LICENSE).
@@ -2,14 +2,14 @@
2
2
 
3
3
  `common-python-tasks` provides reusable, opinionated [Poe the Poet](https://poethepoet.natn.io/guides/packaged_tasks.html) tasks for Python development, packaging, releases, containers, and documentation.
4
4
 
5
- Read the [complete documentation](https://ci-sourcerer.github.io/common-python-tasks/) for the task reference, configuration options, and deployment guidance.
5
+ Read the [complete documentation](https://common-python-tasks.ci-sourcerer.com/) for the task reference, configuration options, and deployment guidance.
6
6
 
7
7
  ## Quick start
8
8
 
9
9
  Add the package as a development dependency.
10
10
 
11
11
  ```shell
12
- uv add --dev common-python-tasks==0.12.0
12
+ uv add --dev common-python-tasks==0.13.0
13
13
  ```
14
14
 
15
15
  Expose the default task set in `pyproject.toml`.
@@ -50,12 +50,12 @@ poe docs-build
50
50
  poe docs-serve
51
51
  ```
52
52
 
53
- The [documentation workflow guide](https://ci-sourcerer.github.io/common-python-tasks/documentation-workflows/) covers GitHub Actions artifacts, optional Cloudflare Pages previews, and GitHub Pages deployment.
53
+ The [documentation workflow guide](https://common-python-tasks.ci-sourcerer.com/documentation-workflows/) covers GitHub Actions artifacts, optional Cloudflare Pages previews, and GitHub Pages deployment.
54
54
 
55
55
  ## Learn more
56
56
 
57
- - [Getting started](https://ci-sourcerer.github.io/common-python-tasks/getting-started/)
58
- - [Task reference](https://ci-sourcerer.github.io/common-python-tasks/tasks/)
59
- - [Configuration reference](https://ci-sourcerer.github.io/common-python-tasks/configuration/)
57
+ - [Getting started](https://common-python-tasks.ci-sourcerer.com/getting-started/)
58
+ - [Task reference](https://common-python-tasks.ci-sourcerer.com/tasks/)
59
+ - [Configuration reference](https://common-python-tasks.ci-sourcerer.com/configuration/)
60
60
 
61
61
  The project is in alpha, so minor releases may contain breaking changes. It is distributed under the [MIT license](LICENSE).
@@ -43,7 +43,7 @@ Container variables are read by the host-side tasks unless their description exp
43
43
  | `WORKDIR_PATH` | Home and working directory for the non-root `py` user; defaults to `/workspace` |
44
44
  | `CONTAINER_APT_PACKAGES` | Space-delimited APT packages installed in the runtime stage |
45
45
  | `CONTAINER_CUSTOM_ENTRYPOINT` | `[project.scripts]` key selected as the image entrypoint command |
46
- | `CONTAINER_DOCKER_BUILD_ARGS` | Shell-tokenized arguments passed directly to `docker build`; task arguments after `--` take precedence |
46
+ | `CONTAINER_DOCKER_BUILD_OPTIONS` | Shell-tokenized options passed directly to `docker build`; task options after `--` take precedence |
47
47
  | `CONTAINER_DOCKERFILE_PATH` | Project-owned application Dockerfile used by `build-image`, `build`, and `release` instead of the bundled template |
48
48
  | `CONTAINER_DOCKERFILE_HOOK_PATH` | Executable host script that modifies the selected Dockerfile before the build |
49
49
  | `CONTAINER_PRUNE_KEEP` | Prior images kept after a build; `-1` disables pruning, `0` keeps only the latest, and `N` keeps the latest plus `N` prior images |
@@ -0,0 +1,183 @@
1
+ # Documentation workflows
2
+
3
+ Projects can use the packaged documentation tasks locally and the repository's reusable GitHub workflow in CI. The workflow builds the caller's repository, not `common-python-tasks`.
4
+
5
+ ## Configure a project
6
+
7
+ Add a `zensical.toml` file and select the `docs` task group.
8
+
9
+ ```toml
10
+ [tool.poe]
11
+ include_script = "common_python_tasks:tasks(include_tags=['common', 'docs'])"
12
+ ```
13
+
14
+ Build or serve the site locally.
15
+
16
+ ```shell
17
+ poe docs-build
18
+ poe docs-serve
19
+ ```
20
+
21
+ ## Build pull-request artifacts
22
+
23
+ Keep event triggers and path filters in the consuming repository, then call the reusable workflow from a job.
24
+
25
+ ```yaml
26
+ name: docs-preview
27
+
28
+ on:
29
+ pull_request:
30
+ paths:
31
+ - 'docs/**'
32
+ - 'zensical.toml'
33
+ - 'pyproject.toml'
34
+ - 'uv.lock'
35
+
36
+ jobs:
37
+ docs:
38
+ uses: ci-sourcerer/common-python-tasks/.github/workflows/docs.yml@v0.11.0
39
+ with:
40
+ python_version: '3.14'
41
+ dependency_group: dev
42
+ permissions:
43
+ contents: read
44
+ ```
45
+
46
+ The workflow uploads the rendered site as a GitHub Actions artifact by default.
47
+
48
+ ## Run a client-owned generated-document check
49
+
50
+ Some projects generate additional documentation from application code. Keep that generator in the consuming project and pass its Poe check task to the workflow.
51
+
52
+ ```yaml
53
+ with:
54
+ python_version: '3.14'
55
+ dependency_group: dev
56
+ generated_docs_check_task: docs-cli-reference-check
57
+ ```
58
+
59
+ Only task names containing letters, digits, underscores, and hyphens are accepted.
60
+
61
+ ## Enable Cloudflare Pages previews
62
+
63
+ Cloudflare publication is optional. The workflow ensures that one Direct Upload Pages project exists for the consuming repository, then deploys previews to it with narrowly scoped credentials.
64
+
65
+ ```yaml
66
+ jobs:
67
+ docs:
68
+ uses: ci-sourcerer/common-python-tasks/.github/workflows/docs.yml@v0.11.0
69
+ with:
70
+ python_version: '3.14'
71
+ dependency_group: dev
72
+ publish_cloudflare: true
73
+ cloudflare_project_name: stacksmith-docs
74
+ cloudflare_preview_domain: preview.example.com
75
+ cloudflare_preview_zone: example.com
76
+ permissions:
77
+ contents: read
78
+ deployments: write
79
+ secrets:
80
+ cloudflare_account_id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
81
+ cloudflare_api_token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
82
+ ```
83
+
84
+ The project is created on the first trusted pull request, using `main` as its production branch by default. Set `cloudflare_production_branch` if the repository uses a different default branch. Set `cloudflare_preview_domain` to publish previews at `pr-42.preview.example.com`; leave it empty to use `pr-42.stacksmith-docs.pages.dev`. Set `cloudflare_preview_zone` when the preview domain is a subdomain of the DNS zone. The API token needs Pages Write, Zone Read, and Zone DNS Edit permissions when custom preview domains are enabled. Fork pull requests receive the build artifact but are not published because repository secrets are unavailable. A separate `pull_request`-closed workflow can remove the custom hostname, its matching DNS record, and older deployments for that preview branch while preserving the shared Pages project. Cloudflare retains the latest branch deployment.
85
+
86
+ ## Deploy documentation to GitHub Pages
87
+
88
+ Enable GitHub Actions as the repository's Pages source. GitHub Pages deployments are versioned by default and publish the current checkout as `dev` unless the caller selects another version. The caller must grant `contents: write` so the workflow can update the versions branch.
89
+
90
+ ```yaml
91
+ jobs:
92
+ docs:
93
+ uses: ci-sourcerer/common-python-tasks/.github/workflows/docs.yml@v0.11.0
94
+ with:
95
+ python_version: '3.14'
96
+ dependency_group: dev
97
+ deploy_github_pages: true
98
+ permissions:
99
+ contents: write
100
+ pages: write
101
+ id-token: write
102
+ ```
103
+
104
+ This initial deployment creates `dev` and uses it as the site root when the versions branch does not already contain a root redirect. Pin the workflow to the release that matches the installed package. Pin an exact commit SHA when an immutable workflow reference is required.
105
+
106
+ ## Configure versioned documentation
107
+
108
+ Versioned deployment uses the Zensical-compatible `mike` fork. The workflow keeps generated versions on a Git branch and publishes the assembled branch through GitHub Actions, so the repository's Pages source remains GitHub Actions. The fork is a transitional dependency until Zensical provides native versioning support.
109
+
110
+ Enable the version selector in `zensical.toml`.
111
+
112
+ ```toml
113
+ [project.extra.version]
114
+ provider = "mike"
115
+ default = ["latest", "dev"]
116
+
117
+ [project.plugins.mike]
118
+ alias_type = "redirect"
119
+ ```
120
+
121
+ Pass a version identifier, title, aliases, and default version when publishing a release.
122
+
123
+ ```yaml
124
+ jobs:
125
+ docs:
126
+ uses: ci-sourcerer/common-python-tasks/.github/workflows/docs.yml@v0.12.1
127
+ with:
128
+ python_version: '3.14'
129
+ dependency_group: dev
130
+ deploy_github_pages: true
131
+ docs_version: '2.4'
132
+ docs_version_title: '2.4.3'
133
+ docs_aliases: '["latest"]'
134
+ docs_default_version: latest
135
+ permissions:
136
+ contents: write
137
+ pages: write
138
+ id-token: write
139
+ ```
140
+
141
+ `docs_aliases` must be a JSON array. Versions and aliases accept letters, digits, periods, underscores, and hyphens. The default versions branch is `gh-pages`; set `docs_versions_branch` to use another valid Git branch. The reusable workflow serializes updates to each repository and versions branch. Alias redirects are updated atomically with the version metadata, and versions not named by the current deployment remain unchanged.
142
+
143
+ The workflow still performs the strict `poe docs-build` check and uploads the current checkout as the normal Actions artifact. It then builds through `mike`, updates the versions branch, and gives the complete assembled site to GitHub Pages.
144
+
145
+ ## Preview multiple versions locally
146
+
147
+ `poe docs-serve` builds and watches only the current checkout. It is the quickest way to review content, but its version selector has no assembled `versions.json` to load.
148
+
149
+ Install the same pinned Zensical-compatible `mike` fork used by the workflow, assemble two versions on a disposable local Git branch, and serve that branch.
150
+
151
+ ```shell
152
+ uv pip install 'mike @ git+https://github.com/squidfunk/mike.git@2d4ad799442f4592db8ad53b179bfb33db8c69ac'
153
+ uv run --no-sync mike deploy --branch local-docs --alias-type redirect --update-aliases --title Development dev
154
+ uv run --no-sync mike deploy --branch local-docs --alias-type redirect --update-aliases --title 0.12.1 0.12 latest
155
+ uv run --no-sync mike set-default --branch local-docs latest
156
+ uv run --no-sync mike serve --branch local-docs
157
+ ```
158
+
159
+ Open `http://localhost:8000/`. The root redirects to `latest`, and the selector switches between `0.12` and `dev`. These commands create only local commits on `local-docs`; they do not push anything. Stop the server before removing the disposable branch with `git branch -D local-docs`.
160
+
161
+ ## Publish development and release versions
162
+
163
+ Use one serialized production workflow for default-branch and tag deployment. Publish the default branch as `dev`, and publish stable tags to a major/minor documentation series. For example, `v2.4.3` updates version `2.4`, uses `2.4.3` as its display title, moves the `latest` alias, and makes `latest` the site root. Later default-branch deployments update `dev` without moving the root away from `latest`.
164
+
165
+ The repository's own deployment workflow demonstrates this policy. Pull requests continue to use the unversioned artifact and Cloudflare preview flow, so a pull request previews the next `dev` site without modifying the versions branch.
166
+
167
+ ## Backfill an existing release
168
+
169
+ A repository can expose manual workflow inputs that pass an older tag through `checkout_ref` while deploying it under an explicit documentation version. For this repository, run `docs-deploy` manually with values such as the following.
170
+
171
+ | Input | Value |
172
+ | - | - |
173
+ | `source_ref` | A tag that already enables the `mike` version selector, or empty to build the selected workflow ref |
174
+ | `docs_version` | `0.12` |
175
+ | `docs_version_title` | `0.12.1` |
176
+ | `update_latest` | `true` |
177
+ | `default_version` | `latest` |
178
+
179
+ Backfill supported series from oldest to newest so the selector order and `latest` alias finish in the desired state. Historical refs created before versioning was configured cannot produce a working selector without a compatible configuration change; build those docs from a suitable maintenance branch or the current branch instead. A normal default-branch deployment uses `dev` as the initial site root only when the versions branch has no root redirect, which keeps the documentation reachable before the first release or backfill.
180
+
181
+ ## Maintain published versions
182
+
183
+ The versions branch contains `versions.json`, the generated version directories, aliases, and the root redirect. Inspect a local checkout with the same pinned Zensical-compatible fork before deleting or retitling published versions. Since the fork is installed directly from GitHub, changes to its pinned commit require a versioned workflow update and a representative multi-version build test.
@@ -295,7 +295,7 @@ poe build --dockerfile-path docker/Dockerfile.ci
295
295
  poe release --dockerfile-path docker/Dockerfile.release
296
296
  ```
297
297
 
298
- The project root remains the Docker build context. Standard image naming, version and commit tags, metadata build arguments, `CONTAINER_DOCKER_BUILD_ARGS`, Dockerfile hooks, image pruning, and release-time image pushing continue to work. A normal custom build does not select a target stage, so the Dockerfile does not need the bundled `runtime` stage. A custom debug build selects a stage named `debug`.
298
+ The project root remains the Docker build context. Standard image naming, version and commit tags, metadata build arguments, `CONTAINER_DOCKER_BUILD_OPTIONS`, Dockerfile hooks, image pruning, and release-time image pushing continue to work. A normal custom build does not select a target stage, so the Dockerfile does not need the bundled `runtime` stage. A custom debug build selects a stage named `debug`.
299
299
 
300
300
  Settings that render content into the bundled template do not alter a project-owned Dockerfile. This includes `CONTAINER_APT_PACKAGES`, `CONTAINER_CUSTOM_ENTRYPOINT`, `CONTAINER_ENV`, extensions, and dependency-image mappings. Declare equivalent instructions in the project-owned Dockerfile when they are needed. BuildKit secrets derived from `UV_INDEX_*` credentials remain available as Docker build secrets, but the custom Dockerfile must mount them explicitly.
301
301
 
@@ -344,6 +344,8 @@ poe run-container --privileged
344
344
 
345
345
  The image starts as root through Tini and the DinD supervisor. The supervisor prepares nested cgroups, starts a dedicated Docker daemon, and waits for `docker info` to succeed before launching the existing `/pkg/entrypoint.sh` as `py`. Application arguments and exit status are preserved. Signals reach the application, and shutdown stops the application before stopping Docker. Startup failure or loss of the daemon terminates the container with a nonzero status. `DIND_STARTUP_TIMEOUT` controls the readiness deadline in seconds (default `60`, accepted range `1`–`9999`). Each process group gets up to five seconds to stop before being killed; allow more than ten seconds for the outer container's stop timeout.
346
346
 
347
+ Docker daemon output is written to `/var/log/docker.log` by default so it does not mix with application logs. Set `DIND_DOCKER_LOG_PATH` to choose another file path; inspect the file with `docker exec` or mount a log directory if the daemon logs need to be collected.
348
+
347
349
  Docker listens only on `unix:///var/run/docker.sock`. The image sets `DOCKER_HOST` accordingly, and startup clears Docker context and TLS environment overrides so the application uses its own daemon. Do not mount the host Docker socket. The `py` user belongs to the Docker group and can control the nested daemon; this is a privileged container, not a sandbox for untrusted workloads.
348
350
 
349
351
  The image declares volumes for `/var/lib/docker` and `/var/lib/containerd`. Docker creates anonymous volumes automatically. Use dedicated named volumes when state should survive container replacement, and never share them between concurrently running daemons. For example, when launching the built image directly, replace `your-image:tag` with its tag.
@@ -391,7 +393,16 @@ Arguments following Poe's `--` separator are passed directly to `docker build` w
391
393
  poe build-image --single-arch -- --secret id=pip_conf,env=PIP_CONF
392
394
  ```
393
395
 
394
- Set `CONTAINER_DOCKER_BUILD_ARGS` to persist the same options using shell quoting rules. Arguments supplied after `--` replace this setting for that invocation. Managed arguments are emitted before these native Docker arguments, so an explicit option such as `--build-arg WORKDIR_PATH=/app` can override its managed value.
396
+ Set `CONTAINER_DOCKER_BUILD_OPTIONS` to persist the same options using shell quoting rules. Options supplied after `--` replace this setting for that invocation. Managed build arguments are emitted before these native Docker options, so an explicit option such as `--build-arg WORKDIR_PATH=/app` can override its managed value.
397
+
398
+ For project-specific defaults, declare the options in Poe's environment. A name-only `--build-arg` reads its value from the current environment, while `env=` explicitly selects the host variable used for a BuildKit secret.
399
+
400
+ ```toml
401
+ [tool.poe.env]
402
+ CONTAINER_DOCKER_BUILD_OPTIONS = "--secret id=MY_TOKEN,env=MY_TOKEN --build-arg MY_SETTING"
403
+ ```
404
+
405
+ The Dockerfile must consume `MY_TOKEN` with a secret mount. Do not pass sensitive values through `--build-arg`, because build arguments are not designed to protect secrets.
395
406
 
396
407
  See [Container settings](../configuration.md#container-settings) for the complete settings reference.
397
408
 
@@ -9,14 +9,14 @@ Build only the container dependency collector image for this project.
9
9
  ## Usage
10
10
 
11
11
  ```shell
12
- poe build-deps-image [DOCKER_BUILD_ARGS...] [--no-cache] [--plain] [--single-arch]
12
+ poe build-deps-image [DOCKER_BUILD_OPTIONS...] [--no-cache] [--plain] [--single-arch]
13
13
  ```
14
14
 
15
15
  ## Arguments
16
16
 
17
17
  | Argument | Type | Description | Default |
18
18
  | - | - | - | - |
19
- | `docker_build_args...` | `string, repeatable` | Additional arguments passed directly to `docker build`. Provide them after the task's `--` separator. Overrides `CONTAINER_DOCKER_BUILD_ARGS` when provided. | — |
19
+ | `docker_build_options...` | `string, repeatable` | Additional options passed directly to `docker build`. Provide them after the task's `--` separator. Overrides `CONTAINER_DOCKER_BUILD_OPTIONS` when provided. | — |
20
20
  | `--no-cache` | `boolean` | Do not use cache when building the deps image. | `false` |
21
21
  | `--plain` | `boolean` | Do not pretty-print output. | `false` |
22
22
  | `--single-arch` | `boolean` | Build images for a single architecture. | `false` |
@@ -9,14 +9,14 @@ Build the container image using a project-owned or bundled Dockerfile.
9
9
  ## Usage
10
10
 
11
11
  ```shell
12
- poe build-image [DOCKER_BUILD_ARGS...] [--debug] [--no-cache] [--plain] [--single-arch] [--dockerfile-path DOCKERFILE_PATH] [--dockerfile-hook-path DOCKERFILE_HOOK_PATH] [--container-env CONTAINER_ENV...] [--container-envfile CONTAINER_ENVFILE...]
12
+ poe build-image [DOCKER_BUILD_OPTIONS...] [--debug] [--no-cache] [--plain] [--single-arch] [--dockerfile-path DOCKERFILE_PATH] [--dockerfile-hook-path DOCKERFILE_HOOK_PATH] [--container-env CONTAINER_ENV...] [--container-envfile CONTAINER_ENVFILE...]
13
13
  ```
14
14
 
15
15
  ## Arguments
16
16
 
17
17
  | Argument | Type | Description | Default |
18
18
  | - | - | - | - |
19
- | `docker_build_args...` | `string, repeatable` | Additional arguments passed directly to `docker build`. Provide them after the task's `--` separator. Overrides `CONTAINER_DOCKER_BUILD_ARGS` when provided. | — |
19
+ | `docker_build_options...` | `string, repeatable` | Additional options passed directly to `docker build`. Provide them after the task's `--` separator. Overrides `CONTAINER_DOCKER_BUILD_OPTIONS` when provided. | — |
20
20
  | `--debug` | `boolean` | Build the debug image. | `false` |
21
21
  | `--no-cache` | `boolean` | Do not use cache when building the image. | `false` |
22
22
  | `--plain` | `boolean` | Do not pretty-print output. | `false` |
@@ -87,6 +87,7 @@ _main() {
87
87
  return 1
88
88
  fi
89
89
  export DIND_STARTUP_TIMEOUT=${DIND_STARTUP_TIMEOUT:-60}
90
+ export DIND_DOCKER_LOG_PATH=${DIND_DOCKER_LOG_PATH:-/var/log/docker.log}
90
91
  export DOCKER_HOST=unix:///var/run/docker.sock
91
92
  export container=docker
92
93
  unset DOCKER_CONTEXT DOCKER_TLS_VERIFY DOCKER_CERT_PATH
@@ -96,8 +97,8 @@ _main() {
96
97
  trap _shutdown EXIT
97
98
  trap 'exit 143' TERM
98
99
  trap 'exit 130' INT
99
- # Keep daemon logs on stderr and expose only the local Unix socket.
100
- setsid dockerd --host "$DOCKER_HOST" --group docker >&2 &
100
+ setsid dockerd --host "$DOCKER_HOST" --group docker \
101
+ >>"$DIND_DOCKER_LOG_PATH" 2>&1 &
101
102
  daemon_pid=$!
102
103
  _wait_for_docker
103
104
  setsid setpriv --reuid py --regid py --init-groups \
@@ -100,7 +100,7 @@ def _build_docker_build_command(
100
100
  plain: bool,
101
101
  target: BuildStage | None = None,
102
102
  tags: Sequence[str] | None = None,
103
- docker_build_args: Sequence[str] | None = None,
103
+ docker_build_options: Sequence[str] | None = None,
104
104
  ) -> list[str]:
105
105
  build_cmd = [
106
106
  "docker",
@@ -123,8 +123,8 @@ def _build_docker_build_command(
123
123
  build_cmd += ["-t", tag]
124
124
  if plain:
125
125
  build_cmd += ["--progress", "plain"]
126
- if docker_build_args:
127
- build_cmd += [str(arg) for arg in docker_build_args]
126
+ if docker_build_options:
127
+ build_cmd += [str(option) for option in docker_build_options]
128
128
  build_cmd.append(str(context_path))
129
129
 
130
130
  return build_cmd
@@ -180,7 +180,7 @@ def render_build_image(
180
180
  omit_target: bool = False,
181
181
  image_name: str | None = None,
182
182
  extra_build_args: dict[str, str] | None = None,
183
- docker_build_args: Sequence[str] | None = None,
183
+ docker_build_options: Sequence[str] | None = None,
184
184
  dockerfile_hook_path: Path | None = None,
185
185
  keep_generated_files: bool = True,
186
186
  ) -> RenderedBuildPlan:
@@ -197,7 +197,7 @@ def render_build_image(
197
197
  omit_target: Whether to omit the target stage from the command.
198
198
  image_name: Optional image name override.
199
199
  extra_build_args: Extra build-time arguments.
200
- docker_build_args: Additional arguments passed directly to `docker build`.
200
+ docker_build_options: Additional options passed directly to `docker build`.
201
201
  dockerfile_hook_path: Optional executable script path that can mutate
202
202
  the generated Dockerfile in-place before build.
203
203
  keep_generated_files: Whether to leave the generated Dockerfile in place.
@@ -338,7 +338,7 @@ def render_build_image(
338
338
  plain,
339
339
  target=None if omit_target else target,
340
340
  tags=all_tags,
341
- docker_build_args=docker_build_args,
341
+ docker_build_options=docker_build_options,
342
342
  )
343
343
  command_display = " ".join(quote(str(arg)) for arg in build_cmd)
344
344
  return RenderedBuildPlan(
@@ -473,7 +473,7 @@ def build_deps_image(
473
473
  plain: bool = False,
474
474
  single_arch: bool = False,
475
475
  extra_build_args: dict[str, str] | None = None,
476
- docker_build_args: Sequence[str] | None = None,
476
+ docker_build_options: Sequence[str] | None = None,
477
477
  cache_id_suffix: str = "",
478
478
  ) -> str:
479
479
  """Build the dependency collector image and return its full tag.
@@ -486,7 +486,7 @@ def build_deps_image(
486
486
  plain: If `True`, use plain output mode for the Docker build.
487
487
  single_arch: If `True`, build the image for the current host architecture only.
488
488
  extra_build_args: Additional build arguments for the Docker build as a dictionary of `KEY: VALUE` pairs.
489
- docker_build_args: Additional arguments passed directly to `docker build`.
489
+ docker_build_options: Additional options passed directly to `docker build`.
490
490
  cache_id_suffix: A suffix to append to the cache ID.
491
491
 
492
492
  Returns:
@@ -574,7 +574,7 @@ def build_deps_image(
574
574
  no_cache,
575
575
  plain,
576
576
  tags=[full_tag],
577
- docker_build_args=docker_build_args,
577
+ docker_build_options=docker_build_options,
578
578
  )
579
579
 
580
580
  LOGGER.info("Building deps image: %s", full_tag)
@@ -597,7 +597,7 @@ def build_image(
597
597
  omit_target: bool = False,
598
598
  image_name: str | None = None,
599
599
  extra_build_args: dict[str, str] | None = None,
600
- docker_build_args: Sequence[str] | None = None,
600
+ docker_build_options: Sequence[str] | None = None,
601
601
  dockerfile_hook_path: Path | None = None,
602
602
  ) -> tuple[str, str]:
603
603
  """Build the primary image and return its version and commit tags.
@@ -613,7 +613,7 @@ def build_image(
613
613
  omit_target: If `True`, omit the target stage.
614
614
  image_name: Name of the image to build.
615
615
  extra_build_args: Additional build arguments for the Docker build as a dictionary of `KEY: VALUE` pairs.
616
- docker_build_args: Additional arguments passed directly to `docker build`.
616
+ docker_build_options: Additional options passed directly to `docker build`.
617
617
  dockerfile_hook_path: Optional executable script path that can mutate
618
618
  the generated Dockerfile in-place before build.
619
619
 
@@ -636,7 +636,7 @@ def build_image(
636
636
  omit_target=omit_target,
637
637
  image_name=image_name,
638
638
  extra_build_args=extra_build_args,
639
- docker_build_args=docker_build_args,
639
+ docker_build_options=docker_build_options,
640
640
  dockerfile_hook_path=dockerfile_hook_path,
641
641
  keep_generated_files=True,
642
642
  )
@@ -81,14 +81,16 @@ def uv_index_secret_mounts(credentials: list[dict[str, str | None]]) -> list[str
81
81
  ]
82
82
 
83
83
 
84
- def uv_index_secret_build_args(credentials: list[dict[str, str | None]]) -> list[str]:
85
- """Return `docker build --secret` arg pairs for UV index credentials.
84
+ def uv_index_secret_build_options(
85
+ credentials: list[dict[str, str | None]],
86
+ ) -> list[str]:
87
+ """Return `docker build --secret` option pairs for UV index credentials.
86
88
 
87
89
  Args:
88
90
  credentials: Output of `collect_uv_index_credentials`.
89
91
 
90
92
  Returns:
91
- A flat list of `--secret` flag-value pairs for the docker build command.
93
+ A flat list of `--secret` option-value pairs for the Docker build command.
92
94
  """
93
95
  return [
94
96
  item
@@ -131,13 +133,13 @@ def get_python_variant() -> str:
131
133
  def inject_auto_build_args_from_env(
132
134
  build_args: dict[str, str] | None,
133
135
  ) -> dict[str, str]:
134
- """Inject configured environment variables into managed Docker build args.
136
+ """Inject configured environment variables into managed Dockerfile build arguments.
135
137
 
136
138
  Environment-driven build args are only injected if they are set, and never
137
139
  override arguments already managed by the image builder.
138
140
 
139
141
  Args:
140
- build_args: Existing managed Docker build arguments.
142
+ build_args: Existing managed Dockerfile build arguments.
141
143
 
142
144
  Returns:
143
145
  A build-arg dictionary with auto-injected env values merged in.
@@ -337,28 +339,29 @@ def split_colon_delimited_values(value: str) -> list[str]:
337
339
  return split_delimited_values(value, separators=":", allow_whitespace=True)
338
340
 
339
341
 
340
- def resolve_container_docker_build_args(
341
- cli_docker_build_args: tuple[str, ...], env_docker_build_args: str | None
342
+ def resolve_container_docker_build_options(
343
+ cli_docker_build_options: tuple[str, ...],
344
+ env_docker_build_options: str | None,
342
345
  ) -> list[str]:
343
- """Resolve arguments passed directly to `docker build`.
346
+ """Resolve options passed directly to `docker build`.
344
347
 
345
348
  Args:
346
- cli_docker_build_args: Free arguments provided after the task's `--`
349
+ cli_docker_build_options: Free options provided after the task's `--`
347
350
  separator.
348
- env_docker_build_args: Shell-tokenized arguments from the environment.
351
+ env_docker_build_options: Shell-tokenized options from the environment.
349
352
 
350
353
  Returns:
351
- The CLI arguments when provided, otherwise the environment arguments.
354
+ The CLI options when provided, otherwise the environment options.
352
355
  """
353
- if cli_docker_build_args:
354
- return list(cli_docker_build_args)
355
- if not env_docker_build_args:
356
+ if cli_docker_build_options:
357
+ return list(cli_docker_build_options)
358
+ if not env_docker_build_options:
356
359
  return []
357
360
 
358
361
  try:
359
- return shlex.split(env_docker_build_args)
362
+ return shlex.split(env_docker_build_options)
360
363
  except ValueError as error:
361
- utils.fatal(f"Invalid CONTAINER_DOCKER_BUILD_ARGS: {error}")
364
+ utils.fatal(f"Invalid CONTAINER_DOCKER_BUILD_OPTIONS: {error}")
362
365
 
363
366
 
364
367
  def _resolve_optional_file_path(
@@ -490,7 +490,7 @@ def docs_serve(
490
490
 
491
491
  @tasks.script(tags=["containers", "build"])
492
492
  def build_image(
493
- *docker_build_args: str,
493
+ *docker_build_options: str,
494
494
  debug: bool = False,
495
495
  no_cache: bool = False,
496
496
  plain: bool = False,
@@ -503,9 +503,9 @@ def build_image(
503
503
  """Build the container image using a project-owned or bundled Dockerfile.
504
504
 
505
505
  Args:
506
- *docker_build_args: Additional arguments passed directly to `docker build`.
506
+ *docker_build_options: Additional options passed directly to `docker build`.
507
507
  Provide them after the task's `--` separator. Overrides
508
- `CONTAINER_DOCKER_BUILD_ARGS` when provided.
508
+ `CONTAINER_DOCKER_BUILD_OPTIONS` when provided.
509
509
  debug: Build the debug image.
510
510
  no_cache: Do not use cache when building the image.
511
511
  plain: Do not pretty-print output.
@@ -538,12 +538,12 @@ def build_image(
538
538
  parse_container_deps_source,
539
539
  parse_container_extensions,
540
540
  render_container_deps_move_script,
541
- resolve_container_docker_build_args,
541
+ resolve_container_docker_build_options,
542
542
  resolve_container_dockerfile_hook_path,
543
543
  resolve_container_dockerfile_path,
544
544
  resolve_extension_build_context,
545
545
  resolve_extension_content,
546
- uv_index_secret_build_args,
546
+ uv_index_secret_build_options,
547
547
  uv_index_secret_mounts,
548
548
  )
549
549
  from .project import (
@@ -578,9 +578,9 @@ def build_image(
578
578
  if (context := resolve_extension_build_context(desc)) is not None
579
579
  ]
580
580
 
581
- resolved_docker_build_args = resolve_container_docker_build_args(
582
- docker_build_args,
583
- os.getenv("CONTAINER_DOCKER_BUILD_ARGS"),
581
+ resolved_docker_build_options = resolve_container_docker_build_options(
582
+ docker_build_options,
583
+ os.getenv("CONTAINER_DOCKER_BUILD_OPTIONS"),
584
584
  )
585
585
  uv_credentials = collect_uv_index_credentials()
586
586
  if uv_credentials:
@@ -588,9 +588,9 @@ def build_image(
588
588
  "Passing UV index credentials for: %s",
589
589
  ", ".join(c["index_name"] for c in uv_credentials),
590
590
  )
591
- resolved_docker_build_args = uv_index_secret_build_args(uv_credentials) + list(
592
- resolved_docker_build_args
593
- )
591
+ resolved_docker_build_options = uv_index_secret_build_options(
592
+ uv_credentials
593
+ ) + list(resolved_docker_build_options)
594
594
  resolved_dockerfile_hook_path = resolve_container_dockerfile_hook_path(
595
595
  dockerfile_hook_path,
596
596
  os.getenv("CONTAINER_DOCKERFILE_HOOK_PATH"),
@@ -609,7 +609,7 @@ def build_image(
609
609
  single_arch=single_arch,
610
610
  omit_target=not debug,
611
611
  extra_build_args=top_level_build_args or None,
612
- docker_build_args=resolved_docker_build_args,
612
+ docker_build_options=resolved_docker_build_options,
613
613
  dockerfile_hook_path=resolved_dockerfile_hook_path,
614
614
  )
615
615
  _prune_container_images(version_tag, commit_tag)
@@ -713,7 +713,7 @@ def build_image(
713
713
 
714
714
  if deps_content or deps_dockerfile_path:
715
715
  deps_image_tag = build_deps_image_task(
716
- *resolved_docker_build_args,
716
+ *resolved_docker_build_options,
717
717
  no_cache=no_cache,
718
718
  plain=plain,
719
719
  single_arch=single_arch,
@@ -746,8 +746,8 @@ def build_image(
746
746
  plain=plain,
747
747
  single_arch=single_arch,
748
748
  extra_build_args=merged_build_args or None,
749
- docker_build_args=[
750
- *resolved_docker_build_args,
749
+ docker_build_options=[
750
+ *resolved_docker_build_options,
751
751
  *(
752
752
  item
753
753
  for name, path in extension_build_contexts
@@ -768,7 +768,7 @@ def build_image(
768
768
 
769
769
  @tasks.script(task_name="build-deps-image", tags=["containers", "build"])
770
770
  def build_deps_image_task(
771
- *docker_build_args: str,
771
+ *docker_build_options: str,
772
772
  no_cache: bool = False,
773
773
  plain: bool = False,
774
774
  single_arch: bool = False,
@@ -776,9 +776,9 @@ def build_deps_image_task(
776
776
  """Build only the container dependency collector image for this project.
777
777
 
778
778
  Args:
779
- *docker_build_args: Additional arguments passed directly to `docker build`.
779
+ *docker_build_options: Additional options passed directly to `docker build`.
780
780
  Provide them after the task's `--` separator. Overrides
781
- `CONTAINER_DOCKER_BUILD_ARGS` when provided.
781
+ `CONTAINER_DOCKER_BUILD_OPTIONS` when provided.
782
782
  no_cache: Do not use cache when building the deps image.
783
783
  plain: Do not pretty-print output.
784
784
  single_arch: Build images for a single architecture.
@@ -791,7 +791,7 @@ def build_deps_image_task(
791
791
  get_cache_id_suffix,
792
792
  inject_auto_build_args_from_env,
793
793
  parse_container_deps_source,
794
- resolve_container_docker_build_args,
794
+ resolve_container_docker_build_options,
795
795
  )
796
796
  from .utils import fatal
797
797
 
@@ -801,9 +801,9 @@ def build_deps_image_task(
801
801
  "No container dependency source found. Set CONTAINER_DEPS_CONTENT or CONTAINER_DEPS_FILE."
802
802
  )
803
803
 
804
- resolved_docker_build_args = resolve_container_docker_build_args(
805
- docker_build_args,
806
- os.getenv("CONTAINER_DOCKER_BUILD_ARGS"),
804
+ resolved_docker_build_options = resolve_container_docker_build_options(
805
+ docker_build_options,
806
+ os.getenv("CONTAINER_DOCKER_BUILD_OPTIONS"),
807
807
  )
808
808
  extra_build_args = inject_auto_build_args_from_env({})
809
809
  cache_id_suffix = get_cache_id_suffix(no_cache)
@@ -817,7 +817,7 @@ def build_deps_image_task(
817
817
  plain=plain,
818
818
  single_arch=single_arch,
819
819
  extra_build_args=extra_build_args or None,
820
- docker_build_args=resolved_docker_build_args,
820
+ docker_build_options=resolved_docker_build_options,
821
821
  cache_id_suffix=cache_id_suffix,
822
822
  )
823
823
 
@@ -1,10 +1,17 @@
1
1
  [project]
2
2
  site_name = "Common Python Tasks"
3
3
  site_description = "Opinionated Poe the Poet tasks for Python package development"
4
- site_url = "https://ci-sourcerer.github.io/common-python-tasks/"
4
+ site_url = "https://common-python-tasks.ci-sourcerer.com/"
5
5
  repo_name = "ci-sourcerer/common-python-tasks"
6
6
  repo_url = "https://github.com/ci-sourcerer/common-python-tasks"
7
7
 
8
+ [project.extra.version]
9
+ provider = "mike"
10
+ default = ["latest", "dev"]
11
+
12
+ [project.plugins.mike]
13
+ alias_type = "redirect"
14
+
8
15
  [project.theme]
9
16
  features = [
10
17
  "navigation.sections",
@@ -1,104 +0,0 @@
1
- # Documentation workflows
2
-
3
- Projects can use the packaged documentation tasks locally and the repository's reusable GitHub workflow in CI. The workflow builds the caller's repository, not `common-python-tasks`.
4
-
5
- ## Configure a project
6
-
7
- Add a `zensical.toml` file and select the `docs` task group.
8
-
9
- ```toml
10
- [tool.poe]
11
- include_script = "common_python_tasks:tasks(include_tags=['common', 'docs'])"
12
- ```
13
-
14
- Build or serve the site locally.
15
-
16
- ```shell
17
- poe docs-build
18
- poe docs-serve
19
- ```
20
-
21
- ## Build pull-request artifacts
22
-
23
- Keep event triggers and path filters in the consuming repository, then call the reusable workflow from a job.
24
-
25
- ```yaml
26
- name: docs-preview
27
-
28
- on:
29
- pull_request:
30
- paths:
31
- - 'docs/**'
32
- - 'zensical.toml'
33
- - 'pyproject.toml'
34
- - 'uv.lock'
35
-
36
- jobs:
37
- docs:
38
- uses: ci-sourcerer/common-python-tasks/.github/workflows/docs.yml@v0.11.0
39
- with:
40
- python_version: '3.14'
41
- dependency_group: dev
42
- permissions:
43
- contents: read
44
- ```
45
-
46
- The workflow uploads the rendered site as a GitHub Actions artifact by default.
47
-
48
- ## Run a client-owned generated-document check
49
-
50
- Some projects generate additional documentation from application code. Keep that generator in the consuming project and pass its Poe check task to the workflow.
51
-
52
- ```yaml
53
- with:
54
- python_version: '3.14'
55
- dependency_group: dev
56
- generated_docs_check_task: docs-cli-reference-check
57
- ```
58
-
59
- Only task names containing letters, digits, underscores, and hyphens are accepted.
60
-
61
- ## Enable Cloudflare Pages previews
62
-
63
- Cloudflare publication is optional. The workflow ensures that one Direct Upload Pages project exists for the consuming repository, then deploys previews to it with narrowly scoped credentials.
64
-
65
- ```yaml
66
- jobs:
67
- docs:
68
- uses: ci-sourcerer/common-python-tasks/.github/workflows/docs.yml@v0.11.0
69
- with:
70
- python_version: '3.14'
71
- dependency_group: dev
72
- publish_cloudflare: true
73
- cloudflare_project_name: stacksmith-docs
74
- cloudflare_preview_domain: preview.example.com
75
- cloudflare_preview_zone: example.com
76
- permissions:
77
- contents: read
78
- deployments: write
79
- secrets:
80
- cloudflare_account_id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
81
- cloudflare_api_token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
82
- ```
83
-
84
- The project is created on the first trusted pull request, using `main` as its production branch by default. Set `cloudflare_production_branch` if the repository uses a different default branch. Set `cloudflare_preview_domain` to publish previews at `pr-42.preview.example.com`; leave it empty to use `pr-42.stacksmith-docs.pages.dev`. Set `cloudflare_preview_zone` when the preview domain is a subdomain of the DNS zone. The API token needs Pages Write, Zone Read, and Zone DNS Edit permissions when custom preview domains are enabled. Fork pull requests receive the build artifact but are not published because repository secrets are unavailable. A separate `pull_request`-closed workflow can remove the custom hostname, its matching DNS record, and older deployments for that preview branch while preserving the shared Pages project. Cloudflare retains the latest branch deployment.
85
-
86
- ## Deploy production documentation to GitHub Pages
87
-
88
- Enable GitHub Actions as the repository's Pages source. A default-branch caller can then select production deployment.
89
-
90
- ```yaml
91
- jobs:
92
- docs:
93
- uses: ci-sourcerer/common-python-tasks/.github/workflows/docs.yml@v0.11.0
94
- with:
95
- python_version: '3.14'
96
- dependency_group: dev
97
- deploy_github_pages: true
98
- permissions:
99
- contents: read
100
- pages: write
101
- id-token: write
102
- ```
103
-
104
- Pin the workflow to the release that matches the installed package. Pin an exact commit SHA when an immutable workflow reference is required.