Skip to content

configure preview deployments for Pull Requests#11332

Merged
tyrasd merged 1 commit intodevelopfrom
kh/pr-previews
Aug 22, 2025
Merged

configure preview deployments for Pull Requests#11332
tyrasd merged 1 commit intodevelopfrom
kh/pr-previews

Conversation

@k-yle
Copy link
Copy Markdown
Collaborator

@k-yle k-yle commented Aug 21, 2025

Every PR now gets deployed to netlify, similar to how it works in openstreetmap/id-tagging-schema.

In this repo, we use the GitHub Deployments API instead of posting a PR comment, just to reduce noise and notifications. The link to the deployed version is still shown in the PR page:

Untitled

Demo: PR #1 and PR #2 (from a fork). It won't work for this PR itself, it'll only work once this is merged

@k-yle k-yle added the chore-build Improvements to the iD build scripts / CI environment label Aug 21, 2025
Copy link
Copy Markdown
Member

@tyrasd tyrasd left a comment

Choose a reason for hiding this comment

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

Thanks, this looks great with the gh deployments integration!

Other than the small question/suggestion below (and @hlfan's suggestion to keep the no-await-in-loop linter rule), it's looking really good. Feel free to swap over to the final deployment URL when you think it's ready to be merged. ☺️

@k-yle k-yle requested a review from tyrasd August 22, 2025 12:57
@tyrasd tyrasd merged commit 8ba1921 into develop Aug 22, 2025
4 checks passed
@k-yle k-yle deleted the kh/pr-previews branch August 22, 2025 15:23
@k-yle
Copy link
Copy Markdown
Collaborator Author

k-yle commented Aug 22, 2025

oh, it failed because the NETLIFY_* env variables aren't accessible, @tyrasd are these variables limited to the develop branch at the moment? I don't have access to the corresponding settings page to check

@tyrasd
Copy link
Copy Markdown
Member

tyrasd commented Aug 22, 2025

yeah, I just realized that I have set up the secrets as github "environments", which needs to be specified for the respective workflows, see 2e71cbe. It works now (example PR: #11334). 🙇

@tyrasd
Copy link
Copy Markdown
Member

tyrasd commented Feb 24, 2026

FYI: I just configured the API key for iD on the OSM sandbox / test instance https://api06.dev.openstreetmap.org/ to allow the use on https://pr-…--ideditor.netlify.app/ domains. Unfortunately, the OSM API does not allow to use wildcards in the landing URL for oauth2 applications, so I have manually whitelisted a whole bunch on domains (currently for pr ids 11388..11999), allowing to test also uploads from the PR preview instances of iD (after switching to the dev API connection). Feel free to ping me when additional subdomains are needed.

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

Labels

chore-build Improvements to the iD build scripts / CI environment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants