Skip to content

[FEATURE] Docs preview for schema changes#473

Open
John McCall (lowlydba) wants to merge 27 commits intodevfrom
jmccall-schema-docs-publish
Open

[FEATURE] Docs preview for schema changes#473
John McCall (lowlydba) wants to merge 27 commits intodevfrom
jmccall-schema-docs-publish

Conversation

@lowlydba
Copy link
Contributor

@lowlydba John McCall (lowlydba) commented Mar 13, 2026

Description

Allows for slim builds* of the docs repo for pull requests to the schema repo. Schema docs are built from the codegen cli.

* Slim builds are controlled via the SCHEMA_PREVIEW env var to bypass community and blog posts.

Reference

Resolves https://github.com/OvertureMaps/schema-wg/issues/416

Testing

This functionality can be directly tested within this pull request via the Docs build preview comments. This comment will appear on all PRs as a convenience going forward, with the goal that eventually we can directly publish the docs with the generated schema documentation files.

Signed-off-by: John McCall <john@overturemaps.org>
Add inputs to the generate-schema-docs action to check out OvertureMaps/schema (schema-ref, schema-path) and run overture-codegen from that checked-out repo (use its .python-version and working directory). Update the schema PR preview workflow to use env variables (STAGING_URL, PREVIEW_PATH, DOCS_PATH) instead of hardcoded _docs and staging URLs, propagate DOCS_PATH to checkout, Node setup, build, artifact paths, and update S3/CloudFront sync and the preview link to use the new preview path. These changes allow generating docs from the external schema repo and make preview deployment paths configurable for PR previews.

Signed-off-by: John McCall <john@overturemaps.org>
@lowlydba John McCall (lowlydba) changed the title Jmccall schema docs publish [FEATURE] Docs preview for schema changes Mar 13, 2026
Pass --all-packages to uv sync in the generate-schema-docs action so all schema packages are installed before generating docs. Also add a temporary ref (jmccall-schema-docs-builds) to the schema-pr-preview workflow to point the docs preview at a specific branch; a TODO notes this should be removed before merging.

Signed-off-by: John McCall <john@overturemaps.org>
Signed-off-by: John McCall <john@overturemaps.org>
Signed-off-by: John McCall <john@overturemaps.org>
Signed-off-by: John McCall <john@overturemaps.org>
Signed-off-by: John McCall <john@overturemaps.org>
Signed-off-by: John McCall <john@overturemaps.org>
Rename input schema-path to schema-checkout-path for clarity, add a skip-checkout input (default false) and conditionally skip the actions/checkout step. Update all steps to use the new schema-checkout-path (checkout path, python-version-file, working-directory) and loosen uv sync to explicitly sync overture-schema and overture-schema-codegen (remove --all-packages). Update workflow to pass skip-checkout: 'true' when the repo is already checked out at the workspace root.

Signed-off-by: John McCall <john@overturemaps.org>
Rename the generate-schema-docs action input from schema-checkout-path to schema-path and update all usages. Adjusted input descriptions (including skip-checkout) and replaced references in action.yml for checkout path, python-version-file, and working-directory so the same variable is used for checkout destination, Python version lookup, package installation, and docs generation. Also updated schema-pr-preview workflow to pass schema-path: . and rely on skip-checkout when the repo is already checked out at the workspace root.

Signed-off-by: John McCall <john@overturemaps.org>
@github-actions
Copy link

github-actions bot commented Mar 13, 2026

🗺️ Schema reference docs preview is live!

🌍 Preview https://staging.overturemaps.org/schema/pr/473/schema/index.html
🕐 Updated Mar 23, 2026 16:00 UTC
📝 Commit 8fe999b
🔧 env SCHEMA_PREVIEW true

Note

♻️ This preview updates automatically with each push to this PR.

Signed-off-by: John McCall <john@overturemaps.org>
Signed-off-by: John McCall <john@overturemaps.org>
Signed-off-by: John McCall <john@overturemaps.org>
Signed-off-by: John McCall <john@overturemaps.org>
Signed-off-by: John McCall <john@overturemaps.org>
Signed-off-by: John McCall <john@overturemaps.org>
Signed-off-by: John McCall <john@overturemaps.org>
Signed-off-by: John McCall <john@overturemaps.org>
Signed-off-by: John McCall <john@overturemaps.org>
Signed-off-by: John McCall <john@overturemaps.org>
John McCall (lowlydba) and others added 3 commits March 20, 2026 20:27
Signed-off-by: John McCall <john@overturemaps.org>
Signed-off-by: John McCall <john@overturemaps.org>
Signed-off-by: John McCall <john@overturemaps.org>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds GitHub Actions workflows to build and deploy a “slim” docs preview for schema pull requests to the staging site, and cleans up the preview on PR close.

Changes:

  • Introduces a PR-triggered workflow that checks out OvertureMaps/docs, generates schema reference markdown, builds the Docusaurus site, uploads an artifact, and deploys to S3/CloudFront with a sticky PR comment containing the preview link.
  • Adds a cleanup workflow to delete the PR preview from S3 and invalidate CloudFront when the PR is closed.
  • Fixes the default aws_account_id input in the reusable Python package version check workflow to be a quoted string.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/schema-pr-preview.yml Build + deploy staging docs preview for schema PRs and comment back with the preview URL.
.github/workflows/schema-pr-preview-cleanup.yml Remove the PR preview from S3 and invalidate CloudFront on PR close.
.github/workflows/reusable-check-python-package-versions.yaml Quotes the aws_account_id default input value.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI commented Mar 23, 2026

Jennings Anderson (@jenningsanderson) I've opened a new pull request, #481, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link

Copilot AI commented Mar 23, 2026

Jennings Anderson (@jenningsanderson) I've opened a new pull request, #482, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — I just responded to some of CoPilot's ideas and asked it to implement just one of them...

Signed-off-by: John McCall <john@overturemaps.org>
@lowlydba
Copy link
Contributor Author

LGTM — I just responded to some of CoPilot's ideas and asked it to implement just one of them...

Already did it! Good callout though, this definitely heavy enough of a job to have concurrency for

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lowlydba
Copy link
Contributor Author

Jennings Anderson (@jenningsanderson) Copilot's ubuntu-slim comments have been successfully neutered - feel free to @ me if you have any more annoying Copilot habits we need to kick, for now the Org level instructions aren't git-controllable out of the box, sadly

Copy link

@connieksun Connie Sun (connieksun) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving as public reviewer ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants