release-docs.py
release-docs.py promotes documentation from the asf-staging branch to the asf-site branch, making it live on the production website.
What It Does
The script:
- Checks that git is configured with the ASF committer identity
- Clones (or updates) a sibling
../asf-site/checkout and fetches theasf-stagingbranch - Switches to a detached HEAD at
origin/asf-staging - Force pushes to the
asf-sitebranch
Usage
Promote to Production
python3 scripts/release-docs.py
⚠️ WARNING: This will make the documentation live on the production website.
Test Without Pushing
python3 scripts/release-docs.py --no-push
Command-Line Options
--no-push- Perform all steps except the final git push--juneau-root DIR- Juneau source checkout whose juneau-terminal draws the live view (default:JUNEAU_ROOT, then a sibling../master/, then a sibling../juneau/)--console full|board|none- Console output when the live view is available (default:JUNEAU_TERMINAL_CONSOLE, thenboard)
Live View
When a Juneau checkout with juneau-terminal is found, the run is one live view with
two rows: Prechecks (identity) and Promote (fetch, switch, and push, with the push shown as
skipped under --no-push). Without juneau-terminal the script prints plain output.
Prerequisites
- Python 3.10 or higher
- Git (git command must be in PATH)
- Write access to the remote repository
Exit Codes
0- Success1- Error occurred
Notes
- The script uses a persistent sibling
../asf-site/checkout for git operations, reused by later runs - If
--no-pushis used, the checkout is left atorigin/asf-stagingfor manual inspection - A success sound is played when the script completes successfully
- This script does NOT build documentation - it only promotes what's already in
asf-staging
Workflow
This script is typically used as the final step in the documentation release workflow:
- Make documentation changes
- Run
release-docs-stage.pyto deploy to staging - Review the staging site at
https://juneau.staged.apache.org - Run
release-docs.pyto promote to production athttps://juneau.apache.org
Safety
The script includes a warning message before promoting to production to ensure you understand the impact.