Skip to content

Commit acd7dba

Browse files
committed
try and simplicy
1 parent f22bba2 commit acd7dba

2 files changed

Lines changed: 44 additions & 17 deletions

File tree

‎.github/workflows/docs.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ jobs:
7171
-a \
7272
--delete \
7373
--exclude '/.git/' \
74+
--exclude '/versions/' \
7475
../docs/build/html/ \
7576
./
7677
cp ../.asf.yaml .

‎dev/release/README.md‎

Lines changed: 43 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -315,39 +315,65 @@ git push apache 55.2.0
315315

316316
#### Publish the versioned documentation
317317

318-
After the final release tag is available, build the documentation for this release
319-
For example, from the repository root, for `55.0.0`:
318+
**1. Build the documentation from the release tagm using the a configuration
319+
overlay (`docs/scripts/release/conf.py`) from the main checkout. For example,
320+
for `55.0.0`, from the repository root:
320321

321322
```shell
322-
git fetch origin tag 55.0.0
323+
export DATAFUSION_DOCS_OVERLAY="$PWD/docs/scripts/release"
324+
git fetch apache tag 55.0.0
323325
git worktree add --detach /tmp/datafusion-55.0.0 55.0.0
324326
cd /tmp/datafusion-55.0.0/docs
325327
DATAFUSION_DOCS_SOURCE="$PWD/source" DATAFUSION_DOCS_VERSION=55.0.0 \
326-
SPHINXOPTS="-W -c /path/to/current/datafusion/docs/scripts/release" \
328+
SPHINXOPTS="-W -c $DATAFUSION_DOCS_OVERLAY" \
327329
uv run --package datafusion-docs --with sphinx-sitemap ./build.sh
330+
cd -
328331
```
329332

330-
Replace the version and paths for each release. Use an absolute path to the
331-
overlay in your current checkout. The existing `build.sh` generates the tagged
332-
dependency graph and builds the HTML with warnings treated as errors. The
333-
`--with sphinx-sitemap` option supplies the sitemap extension for older tags.
333+
Notes:
334+
1. You need ot use an absolute path to the overlay in your current checkout.
335+
2. The `--with sphinx-sitemap` option supplies the sitemap extension for older tags.
334336

335-
From the current checkout, prepare a separate PR targeting `asf-site`:
337+
prepare a PR targeting `asf-site` that contains the
338+
documentation for this release. (For example
339+
[#25881](https://github.com/apache/datafusion/pull/25881)).
336340

337341
```shell
338-
git fetch origin asf-site
339-
git worktree add -b docs/publish-55.0.0 /tmp/datafusion-asf-site origin/asf-site
340-
mkdir -p /tmp/datafusion-asf-site/versions/55.0.0
342+
mkdir -p docs/build/html/versions/55.0.0
343+
rsync -a /tmp/datafusion-55.0.0/docs/build/html/ docs/build/html/versions/55.0.0/
344+
python3 -m http.server --directory docs/build/html 8000
345+
```
346+
347+
**2. Add the built site to the `asf-site` branch.** Open a PR against
348+
`asf-site` that adds the release under `versions/<version>/`:
349+
350+
```shell
351+
git fetch apache asf-site
352+
git worktree add -b docs/publish-55.0.0 /tmp/datafusion-asf-site apache/asf-site
341353
rsync -a --exclude '/.buildinfo' \
342354
/tmp/datafusion-55.0.0/docs/build/html/ \
343355
/tmp/datafusion-asf-site/versions/55.0.0/
356+
cd /tmp/datafusion-asf-site
357+
git add versions/55.0.0
358+
git commit -m "Publish documentation for 55.0.0"
359+
git push origin docs/publish-55.0.0
344360
```
345361

346-
Check that the release directory does not already exist before copying it.
347-
Review the generated files and open the publication PR for review.
348-
Once it is published, add its entry to `docs/source/_static/versions.json` on
349-
`main` so the picker offers only working destinations. Remove the temporary
350-
worktrees afterward.
362+
The release is live at `https://datafusion.apache.org/versions/55.0.0/` once
363+
the PR is merged.
364+
365+
**3. Add the release to the version picker.** Open a PR against `main` that
366+
adds the release to `docs/source/_static/versions.json`. Put the new release
367+
first and move `"preferred": true` to it, so that it is the default shown.
368+
Only add releases that are already published, since the picker links to them
369+
directly.
370+
371+
Finally, remove the temporary worktrees:
372+
373+
```shell
374+
git worktree remove /tmp/datafusion-55.0.0
375+
git worktree remove /tmp/datafusion-asf-site
376+
```
351377

352378
### 10. Publish on Crates.io
353379

0 commit comments

Comments
 (0)