add Cloudflare Pages deploy previews for fork PRs ( updated title)#632
add Cloudflare Pages deploy previews for fork PRs ( updated title)#632Ashutoshx7 wants to merge 5 commits intokgateway-dev:mainfrom
Conversation
This PR adds a new GitHub Actions workflow to automatically build and deploy PR previews to Netlify. Features: - Builds Hugo site with Go 1.21, Node 20, and Hugo 0.135.0 (Extended) - Deploys preview to Netlify - Posts the preview URL as a comment on the PR - Caches Go and npm dependencies for faster builds - Cancels obsolete in-progress builds for the same PR Fixes kgateway-dev#593 Signed-off-by: Ashutosh Singh <karns7844@gmail.com>
e86161f to
2a0a2f1
Compare
|
Hi @Ashutoshx7 thanks for looking into this. Currently, we use Cloudflare, not Netlify, for this kgateway.dev site. And we technically have this feature already with Cloudflare previews on PRs. The catch is, those only work on PRs that are branches of this repo. If the PR comes from a fork, which is the typical flow for our contributions, it does not work. Do you know if this Netlify approach of yours has a similar limitation? |
- Implemented workflow_run pattern to securely handle fork PRs - Switched from Netlify to Cloudflare Pages as preferred by maintainers - Split build and deploy stages for better security and reliability Signed-off-by: Ashutosh Singh <karns7844@gmail.com>
switched from Netlify to Cloudflare so it matches current stack. |
|
@artberger |
Upgraded all solo.io laboratory links from insecure HTTP to secure HTTPS protocol. This enhances security by encrypting data in transit and improves SEO as modern search engines prefer HTTPS links. Changes: - data/labs.yaml: Updated 7 lab URLs to use HTTPS - layouts/shortcodes/learning-paths-list.html: Updated template to use HTTPS - content/blog/guide-to-installing-kgateway.md: Updated blog link to use HTTPS Signed-off-by: Ashutosh Singh <karns7844@gmail.com>
Signed-off-by: Ashutosh Singh <karns7844@gmail.com>
This reverts commit e4964af. Signed-off-by: Ashutosh Singh <karns7844@gmail.com>
54a9d7c to
1d4a395
Compare
|
in a recent commit i just improved deploy workflow error handling and PR comments |
|
@artberger incase you missed this ! |
Description (Updated)
This PR adds automatic documentation previews for Pull Requests using Cloudflare Pages, with a specific focus on supporting contributions from forks.
Motivation:
Currently, Cloudflare previews only work for branches pushed directly to the main repository. This PR implements a "workflow_run" pattern to enable previews for all contributors (including those working from forks) while maintaining repository security.
What changed:
pull_requestand uploads the artifact. It has no access to secrets and is safe for forks.Related issues:
Fixes #593
Change Type
/kind feature
/kind install
Changelog
Additional Notes
This workflow will officially start triggering once it is merged into the default branch. To enable the automated deployments, the following secrets should be configured in the repository:
CLOUDFLARE_API_TOKEN
CLOUDFLARE_ACCOUNT_ID
CLOUDFLARE_PROJECT_NAME