ci: auto-sync docs/ to the website on doc changes#5308
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5308 +/- ##
============================================
+ Coverage 51.14% 51.29% +0.14%
- Complexity 2413 2418 +5
============================================
Files 1054 1054
Lines 40923 40923
Branches 4381 4381
============================================
+ Hits 20932 20993 +61
+ Misses 18791 18706 -85
- Partials 1200 1224 +24
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Adds a workflow that mirrors the codebase docs/ tree (the single source of truth) into apache/incubator-texera-site on any docs change on main, then pushes so the site rebuilds. Preserves the site's own front matter (aliases/menu), mirrors adds and deletes, runs only on apache/texera. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
685a76f to
f9a167a
Compare
|
/request-review @aglinxinyuan |
There was a problem hiding this comment.
Pull request overview
Adds a dedicated GitHub Actions workflow to keep the Hugo website documentation in apache/incubator-texera-site synchronized with this repo’s docs/ folder whenever docs/** changes on main (or via manual dispatch), by updating the site repo and pushing a commit to trigger its existing publish pipeline.
Changes:
- Introduces
.github/workflows/sync-docs-to-site.ymlto syncdocs/intocontent/docs/latest/in the website repo. - Uses an inline Python script to preserve target front matter while replacing Markdown bodies, and removes pages that no longer exist upstream.
- Commits and pushes changes to the website repo with retry + rebase logic.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
### What changes were proposed in this PR? - Adds a GitHub Actions workflow that keeps the website docs in sync with this repository, which is the single source of truth for documentation. - How it works: when any file under `docs/` changes on `main`, the workflow copies each Markdown page body into the website repo (apache/incubator-texera-site) and pushes it, which triggers the site's existing publish build. - It preserves the website's own front matter (page redirects and menu settings) and only replaces the body, so site navigation and aliases are never clobbered; new pages are copied and removed pages are deleted, so the site stays a faithful mirror. - The job runs only on `apache/texera` (forks are skipped) and can also be triggered manually from the Actions tab. ### Any related issues, documentation, or discussions? Related to: apache#5001 ### How was this PR tested? - Need a token from the incubator GitHub to test ### Was this PR authored or co-authored using generative AI tooling? Co-authored with Claude Opus 4.8 in compliance with ASF --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
What changes were proposed in this PR?
docs/changes onmain, the workflow copies each Markdown page body into the website repo (apache/incubator-texera-site) and pushes it, which triggers the site's existing publish build.apache/texera(forks are skipped) and can also be triggered manually from the Actions tab.Any related issues, documentation, or discussions?
Related to: #5001
How was this PR tested?
Was this PR authored or co-authored using generative AI tooling?
Co-authored with Claude Opus 4.8 in compliance with ASF