Skip to content

Use repository_dispatch for previewing instead #1384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 27, 2025

Conversation

st0012
Copy link
Member

@st0012 st0012 commented Jun 27, 2025

After testing, #1370 doesn't work for forks as the trigger-fork-preview is run on the fork repo, not on the main repo, the secrets actually aren't available. So I'm changing the flows to the below:

Main Repository PR Flow

graph LR
    A[PR Opened<br/>from main repo] --> B[pr-preview-check.yml<br/>deploy-main-repo job]
    B --> C[Dispatch Event<br/>with GITHUB_TOKEN]
    C --> D[cloudflare-preview.yml<br/>receives dispatch]
    D --> E[Deploy with<br/>Repository Secrets]
Loading

Fork PR Flow

graph LR
    A[PR Opened<br/>from fork] --> B[pr-preview-check.yml<br/>approve-fork job]
    B --> D[Manual Approval<br/>Required]
    D --> F[fork-preview-deploy.yml<br/>triggered by workflow_run and dispatches event]
    F --> G[cloudflare-preview.yml<br/>receives dispatch]
    G --> H[Deploy with<br/>Repository Secrets]
Loading

Copy link

cloudflare-workers-and-pages bot commented Jun 27, 2025

Deploying rdoc with  Cloudflare Pages  Cloudflare Pages

Latest commit: e2a5443
Status: ✅  Deploy successful!
Preview URL: https://a8c9e5d8.rdoc-6cd.pages.dev
Branch Preview URL: https://improve-preview-building-wor.rdoc-6cd.pages.dev

View logs

@st0012 st0012 had a problem deploying to fork-preview-protection June 27, 2025 21:59 — with GitHub Actions Failure
@st0012 st0012 force-pushed the improve-preview-building-workflows branch from ca3e789 to 4850374 Compare June 27, 2025 22:03
@st0012 st0012 temporarily deployed to fork-preview-protection June 27, 2025 22:03 — with GitHub Actions Inactive
@st0012 st0012 force-pushed the improve-preview-building-workflows branch from 4850374 to e2a5443 Compare June 27, 2025 22:05
@st0012 st0012 merged commit f4592db into master Jun 27, 2025
53 of 61 checks passed
@st0012 st0012 deleted the improve-preview-building-workflows branch June 27, 2025 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant