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:
- Clones the repository to a temporary directory
- Fetches the
asf-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
Prerequisites
- Python 3.6 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 temporary directory for git operations
- The temp directory is automatically cleaned up after successful push
- If
--no-pushis used, the temp directory is not cleaned up (for 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.
Share feedback or follow-up questions for this page directly through GitHub.