feat(pages): serve install scripts from the custom domain (open-codereview.ai/install.sh)
Description
Now that the project has its own domain (https://open-codereview.ai/), we can serve the install scripts directly from it and shorten the install commands.
Today every install command points at the long raw GitHub URL:
# current
curl -fsSL https://raw.githubusercontent.com/alibaba/open-code-review/main/install.sh | sh
irm https://raw.githubusercontent.com/alibaba/open-code-review/main/install.ps1 | iex
With the scripts hosted on the domain, this becomes short and memorable (matching the industry convention of get.docker.com, sh.rustup.rs, etc.):
# desired
curl -fsSL https://open-codereview.ai/install.sh | sh
irm https://open-codereview.ai/install.ps1 | iex
The landing site is a static site deployed to GitHub Pages (.github/workflows/deploy-pages.yml), with the domain configured via pages/public/CNAME (open-codereview.ai). So any file that ends up in the built artifact root is reachable at https://open-codereview.ai/<file>.
Note: the install scripts do not hard-depend on the raw URL for their actual work — downloads go through the GitHub API + releases (install.sh main()); the raw.githubusercontent.com string only appears in the header comments. So hosting them under the domain is purely additive and safe.
Scope
- Hosting mechanism (pick one, single source of truth preferred):
- Recommended: in
.github/workflows/deploy-pages.yml, extend the Prepare deployment artifact step to also copyinstall.shandinstall.ps1into_site/(it already does this forlogo.svg). Keeps the scripts at repo root as the single source. - Alternative: copy the scripts into
pages/public/(webpack'sCopyPlugincopiespages/public/*intodist, seepages/webpack.config.js), at the cost of maintaining duplicate files.
- Recommended: in
- Update install commands to the short domain URL:
pages/src/components/HeroSection.tsx(theINSTALL_CHANNELSarray — note this is also touched by #408)README.md,README.zh-CN.md,README.ja-JP.md,README.ko-KR.md,README.ru-RU.md- Docs:
pages/src/content/docs/{en,zh,ja}/installation.md,.../integrations/ci.md,.../integrations/claude-code.md,.../integrations/delegate.md
- Optionally update the header comments inside
install.sh/install.ps1to reference the short URL too.
Acceptance Criteria
- [ ]
install.shandinstall.ps1are included in the deployed Pages artifact and reachable athttps://open-codereview.ai/install.shandhttps://open-codereview.ai/install.ps1 - [ ]
curl -fsSL https://open-codereview.ai/install.sh | shinstalls the CLI successfully - [ ]
irm https://open-codereview.ai/install.ps1 | iexinstalls the CLI successfully on Windows - [ ] All install commands in README (all 5 locales) and docs (en/zh/ja) use the short domain URL
- [ ] Code check passes (
make check)
Context
Discovered while reviewing #408, which redesigns the Hero section and introduces three install channels still using the long raw URLs. Ideally the URL swap lands together with, or right after, that PR so the new install channels ship with the short domain.
The GitHub Pages 404.html SPA fallback (pages/webpack.config.js) should not interfere, since real files take precedence over the fallback — worth a quick verification that the raw .sh/.ps1 content is served as-is (not the HTML shell) when fetched via curl.
@lizhengfeng101 Hi, I’d like to work on this issue. I’ll keep the root installation scripts as the single source of truth, include them in the Pages artifact, update the documented installation URLs, and run the project checks.
@lizhengfeng101 Hi, I’d like to work on this issue. I’ll keep the root installation scripts as the single source of truth, include them in the Pages artifact, update the documented installation URLs, and run the project checks.你好,我想参与这个问题的处理。我会保留 root 安装脚本作为唯一的真实来源,把它们包含在 Pages 工件中,更新文档中的安装 URL,并运行项目检查。
@dubeyharshit0605 Looking forward to your PR~
the issue is still open?