Conversation
GitHub does not expose repository secrets to `pull_request` runs whose head is a fork, so the `copy files via ssh` step of the "Deploy client docs" workflow can never succeed there and turns the check red on every external PR that touches packages/core/client. Skip the step in that case; the docs still build, and pushes to main and internal branches deploy as before. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved review comments remain, and deployment behavior is preserved for trusted runs.
Pull request overview
Updates the client documentation workflow to avoid false failures for pull requests from forks.
Changes:
- Skips secret-dependent SSH deployment for fork PRs.
- Preserves documentation builds and deployment for pushes and same-repository PRs.
File summaries
| File | Description |
|---|---|
.github/workflows/deploy-client-docs.yml |
Adds a fork-aware condition to the deployment step. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch has not been 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.
This is a ...
Motivation
Every pull request from a fork that touches
packages/core/client/**gets a redBuildcheck from the Deploy client docs workflow, even though nothing in the PR is broken.Both docs builds succeed; only the last step fails:
The step uses
secrets.CN_CLIENT_HOST/CN_CLIENT_KEY/ … to upload the built docs to the preview server. GitHub does not expose repository secrets topull_requestruns whose head is a fork (this is a platform rule to keep secrets away from untrusted workflow changes), so the inputs are empty andappleboy/scp-actionaborts before connecting. There is no configuration on the repository side that can change this.The workflow's own run history shows the split:
pull_requestruns from internalnocobase/nocobasebranches (e.g. #10074, #10092, #10494) succeed, while every run from a fork fails the same way (e.g. #10431, #10488). The failure is not visible to maintainers working from internal branches, which is probably why it has stayed.Consequences for external contributors: the PR shows an overall failing status that has nothing to do with the change, and the reviewer has to open the job to find out that only the deploy step failed.
Description
Adds an
ifto thecopy files via sshstep so that it runs only when secrets can actually be present:pushtomain: unchanged, deploys as before.pull_requestfrom a branch innocobase/nocobase: unchanged, deploys thepr-<n>preview as before.pull_requestfrom a fork: the docs are still built (so a broken docs build is still caught), the deploy step is reported as skipped instead of failed, and the check goes green.Nothing is lost for fork PRs: the preview has never been produced for them, since this step has never succeeded on a fork.
A note for maintainers: if a docs preview for fork PRs is wanted, the usual safe pattern is to split the workflow — build and upload an artifact on
pull_request(no secrets needed), then deploy from a separateworkflow_runjob that runs with the repository's identity and never executes contributor code. That is a bigger change to your deploy setup, so this PR only makes the current behaviour honest and leaves that decision to you.Verified: the YAML parses; the expression is the standard fork check used in GitHub's own docs. Because workflow definitions are taken from the base branch, existing PRs (including #10488) will only pick this up on their next push after merge.
Related issues
Observed on #10488 and #10431.
Showcase
Changelog
Docs
Checklists
🤖 Generated with Claude Code