chore: added deploy and redeploy documentation preview workflows (#DS-4784)#1769
Draft
artembelik wants to merge 2 commits into
Draft
chore: added deploy and redeploy documentation preview workflows (#DS-4784)#1769artembelik wants to merge 2 commits into
artembelik wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the documentation preview CI by replacing the old PR-triggered Firebase deploy workflow with separate build and deploy workflows, and by introducing a comment-triggered “redeploy preview” workflow. It also tightens access to comment-triggered workflows by restricting who can trigger them based on author_association.
Changes:
- Added
deploy-preview.ymlto deploy Firebase Hosting previews for eligible in-repo PRs. - Added
redeploy-preview.ymlto redeploy previews via PR comment command (/redeploy-preview). - Updated
e2e-approve-snapshots.ymlto restrict/approve-snapshotstriggering toOWNER/MEMBER, and removed the legacypr-docs-preview.ymlworkflow in favor of the new split workflow setup.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/redeploy-preview.yml |
New comment-triggered workflow to rebuild and redeploy documentation preview channels. |
.github/workflows/pr-docs-preview.yml |
Removed the previous PR-based hosting deploy workflow. |
.github/workflows/e2e-approve-snapshots.yml |
Restricted snapshot-approval command execution and clarified permissions intent. |
.github/workflows/deploy-preview.yml |
New PR-based workflow to deploy documentation previews for in-repo PRs. |
.github/workflows/build.yml |
New PR-based workflow to build packages/docs independently of deploy eligibility. |
Comments suppressed due to low confidence (1)
.github/workflows/e2e-approve-snapshots.yml:22
- This workflow runs PR-controlled code with
contents: write, but it only checks the commenter’sauthor_association. On forked PRs,head_refmay not exist in this repo (or may collide with an existing branch likemain), and the job could end up running on/pushing to the wrong branch with a write token. Also, usingcontains()can trigger on any mention of the command (quotes/code blocks); preferstartsWith()to reduce accidental execution.
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/approve-snapshots') && contains(fromJSON('["OWNER", "MEMBER"]'), github.event.comment.author_association) }}
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: xt0rted/pull-request-comment-branch@e8b8daa837e8ea7331c0003c9c316a64c6d8b0b1 # v3.0.0
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+18
to
+30
| redeploy: | ||
| if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/redeploy-preview') && contains(fromJSON('["OWNER", "MEMBER"]'), github.event.comment.author_association) }} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: xt0rted/pull-request-comment-branch@e8b8daa837e8ea7331c0003c9c316a64c6d8b0b1 # v3.0.0 | ||
| id: comment-branch | ||
| - uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1 | ||
| with: | ||
| message: 🔄 [Redeploying](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) documentation preview. | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
| ref: ${{ steps.comment-branch.outputs.head_ref }} | ||
| - uses: ./.github/workflows/actions/setup-node |
Comment on lines
+9
to
+16
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| - uses: ./.github/workflows/actions/setup-node | ||
| - uses: ./.github/workflows/actions/build-packages | ||
| - uses: ./.github/workflows/actions/build-docs |
artembelik
marked this pull request as draft
July 22, 2026 11:41
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.
#1689, #1727