Internal: Add WP Playground PR preview and build artifact comment [TMZ-1068] - #681
Open
Ntnelbaba wants to merge 1 commit into
Open
Internal: Add WP Playground PR preview and build artifact comment [TMZ-1068]#681Ntnelbaba wants to merge 1 commit into
Ntnelbaba wants to merge 1 commit into
Conversation
…Z-1068] Adapt Elementor Core's PR flow for Hello Theme (theme-only): - Minimal theme-only Playground blueprint installing/activating the built hello-elementor theme from a nightly.link artifact URL - Reusable playground-preview workflow creating a transient deployment - build.yml wiring: preview job for successful PR builds in elementor repos, plus build-artifact PR comment with a fork log fallback Ref: TMZ-1068 Co-authored-by: Cursor <cursoragent@cursor.com>
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio. |
| retention-days: 7 | ||
| - name: Find existing comment on PR (Elementor repo) | ||
| if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.repo.full_name, 'elementor/') | ||
| uses: peter-evans/find-comment@v4 |
| body-includes: 'Hello Elementor Build' | ||
| - name: Comment build info on PR (Elementor repo) | ||
| if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.repo.full_name, 'elementor/') | ||
| uses: peter-evans/create-or-update-comment@v5 |
Hello Elementor BuildLast updated at: 20260816.1105 ✅ Hello Elementor build is ready for download. You can download the latest build from the link below: The build is available for 7 days. |
Ntnelbaba
enabled auto-merge (squash)
August 16, 2026 12:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings Elementor Core's PR experience to Hello Theme, adapted for a theme (not a plugin):
tests/playwright/blueprints/pr-preview.jsoninstalls and activates only the builthello-elementortheme from a nightly.link artifact URL. No Elementor plugin, options, experiments, or other packages are added by the blueprint..github/workflows/playground-preview.ymldownloads the PR build artifact, validateshello-elementor.<version>.zip, repacks a Playground artifact rooted athello-elementor/, generates theplayground.wordpress.netURL, and creates a transientplayground-previewdeployment on the PR head SHA.build.ymlruns theplayground-previewjob only for successful PR builds in elementor-owned repos, and now posts a build-artifact comment on elementor-owned PRs (with a fork fallback that prints artifact info to the job log), mirroring Core.Notes
Test plan
playground-previewdeployment shows up and its URL boots WordPress with only Hello Elementor active (theme active, no Elementor plugin).Ref: TMZ-1068
Made with Cursor
✨ PR Description
1. Problem & Context
Enable WP Playground PR previews and build artifact tracking for Elementor repo PRs. Automates environment setup with timestamped builds and GitHub deployment integration.
2. What Changed (Where)
.github/workflows/build.yml: Add job permissions, environment variables (DATE_VERSION, PACKAGE_VERSION), PR comment with artifact link, fork PR artifact info fallback.github/workflows/playground-preview.yml: New workflow downloads build artifact, repacks for Playground, generates blueprint JSON, creates GitHub deploymenttests/playwright/blueprints/pr-preview.json: Blueprint template for Playground environment with theme installation3. How It Works
Build job exports
artifact_nameoutput, generates versioned ZIP filename and timestamp. For Elementor repo PRs, posts/updates comment with artifact download link; for forks, prints artifact info to logs. Playground preview workflow downloads artifact, restructures directory layout, generates theme zip URL in blueprint JSON, creates deployment with Playground URL as environment_url. Blueprint auto-logs in, installs theme from URL, activates hello-elementor.4. Risks
startsWith(github.repository, 'elementor/')), but build job comment condition usesstartsWith(github.event.pull_request.head.repo.full_name, 'elementor/')— different scopes could divergepr-preview.jsonblueprint is valid before deployment creationGenerated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how