Skip to content

ci: deploy playground to cdn - #287

Merged
gene9831 merged 3 commits into
developfrom
test-deploy-cdn
Jan 21, 2026
Merged

ci: deploy playground to cdn#287
gene9831 merged 3 commits into
developfrom
test-deploy-cdn

Conversation

@hexqi

@hexqi hexqi commented Jan 18, 2026

Copy link
Copy Markdown
Contributor

playground单独部署到cdn,解决部分用户直接访问github page 可能不通的问题

验证:
部署地址:

image

Summary by CodeRabbit

  • Chores
    • Automated deployment workflow for playground releases to CDN with versioning and timestamp tracking.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Jan 18, 2026

Copy link
Copy Markdown

Walkthrough

A new GitHub Actions workflow was introduced that orchestrates building and deploying the playground application to a CDN via Huawei Cloud Object Storage. The workflow validates credentials, builds the playground with versioned metadata including Shanghai timestamps, and uploads artifacts to OBS with versioned and conditional latest-release paths.

Changes

Cohort / File(s) Summary
GitHub Actions CDN Deployment Workflow
\.github/workflows/deploy-playground-to-cdn\.yml
Introduces new deployment workflow with three jobs: check-secrets validates Huawei Cloud credentials, build clones repo, configures pnpm/Node.js, caches dependencies, and generates version metadata with Shanghai timestamp appended to playground package.json version. Exports CDN_BASE, CDN_BASE_LATEST, OBS_PATH, and OBS_PATH_LATEST environment variables. deploy-cdn job retrieves build artifact, installs obsutil, uploads dist to versioned OBS path, and conditionally updates references in HTML/JS/CSS files for latest release deployments.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 With whiskers twitching, I build and deploy,
Shanghai timestamps bring rabbity joy,
To Huawei's clouds, the playground springs,
Versioned paths and CDN wings! 🚀

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'ci: deploy playground to cdn' clearly and concisely describes the main change: adding a CI workflow to deploy the playground to a CDN, which is the primary objective of this pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jan 18, 2026

Copy link
Copy Markdown
Contributor

✅ Preview build completed successfully!

Click the image above to preview.
Preview will be automatically removed when this PR is closed.

@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/workflows/deploy-playground-to-cdn.yml:
- Around line 149-155: Replace the current unpinned download in the "Install
obsutil" step by pinning to a specific obsutil release (avoid /current/),
download both the tarball and the corresponding official SHA256 file, compute
the SHA256 of the downloaded tarball and compare it to the official value, and
abort the workflow with a clear error if the checksum does not match; update the
step that currently runs curl/tar/chmod/mv so it fetches the versioned URL and
checksum, performs the sha256 verification before extracting, and only proceeds
to chmod and sudo mv obsutil when the hash check succeeds.

Comment thread .github/workflows/deploy-playground-to-cdn.yml
@gene9831
gene9831 merged commit d96cd38 into develop Jan 21, 2026
11 of 13 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🧹 Preview Cleaned Up

The preview deployment has been removed.

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.

3 participants