Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add yamz8 to AIR
4 files changed, 17 insertions(+), 17 deletions(-)
5 files changed, 24 insertions(+), 23 deletions(-)
4 files changed, 32 insertions(+), 32 deletions(-)
3 files changed, 6 insertions(+), 6 deletions(-)
6 files changed, 57 insertions(+), 23 deletions(-)
omarchy.cn serves traffic from mainland China, so the zh-CN edition is deployed to an Aliyun OSS bucket in a mainland region. It is additive and inert by default. The English GitHub Pages pipeline in pages.yml, the locale registry, and every other locale's deployment path are untouched. Deploying is enabled by configuring where to deploy: without the OMARCHY_CN_OSS_HOST variable the deploy job skips instead of failing, so the workflow does nothing until a repository opts in with that variable and the two credential secrets. That variable is the bucket domain name, `<bucket>.oss-<region>.aliyuncs.com`, which is the whole destination in one value: the bucket is its first label and the endpoint is the remainder, so the two cannot disagree. scripts/deploy-zh-cn.py is the one entry point. --check refuses a build with a mismatched CNAME, a missing required file or a symlink, without network or credentials; the build job runs it. --deploy HOST runs the same check, then uploads with rclone; the deploy job runs it. The expected CNAME comes from src/i18n/locales.json rather than a hardcoded host, so the check follows the registry when the domain changes. rclone is pinned by version and checked against a SHA-256 recorded in the workflow before it is unpacked. Its remote is defined entirely in the environment, so no config file is written and no credential enters argv. The version is held in OMARCHY_RCLONE_VERSION rather than RCLONE_VERSION: rclone maps every RCLONE_<FLAG> variable onto the matching flag, and would read that one as --version. Every pass is --checksum, which compares the MD5 rclone reads from the bucket listing, so an unchanged file is skipped without a request of its own. That matters at this size -- the build is around 5,500 files and 158 MB, almost none of which changes between deployments. --size-only would skip more cheaply still, but it cannot see an edit that leaves a file the same length. Three copies then one sync, because --header-upload takes one value per invocation: hashed assets immutable, other assets briefly, HTML no-cache. The final sync carries no filter and no header and exists only to delete what the build dropped; it copies nothing, because the passes above already did. It stays unfiltered so that deletion is complete: rclone ignores excluded files on both sides, so a filtered sync would leave stale objects outside the filter in place. A failed pass stops the rest, so nothing is deleted after a failed upload. The build job leaves lint, typecheck and tests to pages.yml, which runs them on the same events and whose npm test already discovers scripts/test_*.py, so this job only does the zh-CN-specific work. The deploy job pins its actions to commit SHAs because it is the job that holds the deploy credentials.
Author
|
Test passed: run 36660515421 deployed via scripts/deploy-zh-cn.py --deploy (3 copies + sync, 187 uploaded, 3 deleted). Closing. |
This branch was successfully deployed
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.
Testing only; will be closed. Verifies the rclone wrapper (
scripts/deploy-zh-cn.py --deploy) with a real deploy before updating #1 and omacom#406. The TEMPORARY commit enables deploying from this branch.