layer5io / layer5io/academy-example

[CI]: Standardize the PR preview-deploy workflow across meshery-academy repos

Open
#161 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/ci
Dominant language
Makefile
Stars
26
Forks
38
PR merge metrics
No merged PRs in 30d

Description

Current Behavior

The preview-deploy workflow has drifted from how the rest of the pipeline is built — it installs its own toolchain and builds the site directly instead of going through the standard make targets that production already uses. Additionally, it relies on checkouts of pull request head/merge refs under pull_request_target, which GitHub is deprecating for security reasons.

Desired Behavior

The preview-deploy workflow needs to be brought in line with GitHub's recommended patterns for handling pull request previews, and that change should be applied consistently across every repository subscribed to the meshery-academy topic so the workflow stays uniform wherever it's used.

Implementation

Split the workflow into a build stage that runs under pull_request using the shared make targets, handing its output to a separate privileged deploy stage via an artifact — the pattern GitHub documents for this use case. Roll the updated workflow out to all meshery-academy-subscribed repositories.

Acceptance Tests
  • The workflow successfully builds the preview via make targets.
  • The workflow successfully passes the built artifacts to the deployment stage via GitHub artifacts.
  • The workflow no longer relies on checking out PR refs under pull_request_target.

Contributor Guide and Resources

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing preview-deploy workflow in academy-example and inspect the repository's shared make targets. Compare the current pull_request_target flow with GitHub's documented build-and-deploy artifact pattern, then identify every repository subscribed to the meshery-academy topic. Done means all subscribed repositories use the same workflow, build through make, pass artifacts between stages, and no longer check out PR refs under pull_request_target.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
build-system, ci-cd, devops
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.