Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Deploy documentation

on:
release:
types: [published]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

jobs:
deploy:
uses: react-component/rc-test/.github/workflows/deploy-pages.yml@main

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

git ls-remote https://github.com/react-component/rc-test.git refs/heads/main

Repository: react-component/cascader

Length of output: 219


将可复用工作流固定到不可变提交 SHA。

当前使用 @main,上游分支变化会在不更新本仓库的情况下改变 Pages 和 OIDC 部署逻辑。请将 react-component/rc-test/.github/workflows/deploy-pages.yml@main 替换为经过审核的 commit SHA,并在后续显式更新。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/deploy-pages.yml at line 15, 将 deploy-pages.yml 中可复用工作流的
uses 引用从 `@main` 更新为经过审核的不可变 commit SHA,保留现有工作流路径不变,确保后续上游逻辑变化必须通过显式 SHA 更新引入。

Source: Learnings

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"compile": "father build",
"coverage": "father test --coverage",
"tsc": "tsc --noEmit",
"deploy": "UMI_ENV=gh npm run build && gh-pages -d docs-dist",
"deploy": "cross-env GH_PAGES=1 npm run build && gh-pages -d docs-dist",
"lint": "eslint src/ examples/ tests/ --ext .tsx,.ts,.jsx,.js",
"prepublishOnly": "npm run compile && rc-np",
"prettier": "prettier --write --ignore-unknown .",
Expand Down
Loading