Run these commands from the repository root. The build reads public GitHub Releases and needs network access. Run npm ci first if Vite is missing.
preview=$(mktemp -d)
bash scripts/build-website.sh "$preview/dist/OpenDirector"
node_modules/.bin/vite preview "$preview" --host 127.0.0.1 --port 8780 --strictPortOpen the site entry, or go directly to the English page or the Simplified Chinese page. The site entry uses your last manual language choice, then the browser language, and defaults to English if neither selects a supported language. With JavaScript disabled, the entry offers links to both pages. Vite supports the byte-range requests the player uses to jump to a shot.
The local preview uses production URLs for canonical and hreflang links. The site entry is the x-default alternate. The sitemap lists only the two language pages.
- In
ThinkFlowLab/OpenDirector, a repository maintainer or admin opens Settings > Pages. Under Build and deployment, set Source to GitHub Actions. The repository supplies the Website workflow and its deployment permissions. It uses GitHub's built-in token. - Merge the website changes into
main. The Website workflow builds the site and runs its Chromium checks. When they pass, the workflow deploys to thegithub-pagesenvironment. Pull requests run the checks only. To deploy the currentmainmanually, open Actions > Website > Run workflow, selectmain, and click Run workflow. - After
deploysucceeds, open the site entry, the English page, and the Simplified Chinese page. Switch languages and check that each download points to the expected Release asset. Verify that each language page has a self-referencing canonical, thehreflanglinks include both language pages and thex-defaultentry, and the sitemap lists only the two language pages. To roll back a site change, revert it onmain.
- Follow the release guide. Check that Release checks and the latest nightly
gate-paritypassed. After the version-bump PR merges, push a newvMAJOR.MINOR.PATCHtag on that merge commit to the official repository. The tag must match the version inapps/desktop/package.json. - The Desktop release workflow creates or reuses a draft for that tag. macOS and Windows each build and test their installer, then attach it and its
.sha256file to the draft. For a release that ships both platforms, expect an Apple Silicon DMG, a Windows x64 EXE, and two checksum files. - Complete the desktop acceptance checks for each platform you plan to publish. In Releases, open the draft, verify its assets, review the English release notes, and click Publish release. Retry failed packaging jobs while the release is still a draft.
- Publishing the release triggers a Website build on
main. For each platform, the build selects the highest official version with an uploaded installer for that architecture. Both language pages use that release's download URL, version label and release notes link. If you add an installer after publication, run Actions > Website > Run workflow onmainto refresh the site.
A Windows-only release updates the Windows download. Mac users keep the latest available Mac package. Until a platform has an official installer, its download points to the tested desktop preview and carries a test-build label. If the GitHub API request fails, the build stops and the previous deployment stays online.
OpenDirector includes the version in each installer filename. GitHub's releases/latest/download/<filename> looks for that exact file in the repository's latest release. Resolving the assets at build time keeps both downloads usable even when they come from different tags. Updating an installed desktop app is tracked in #367.
在仓库根目录运行上面的命令。构建时需要联网读取公开的 GitHub Releases。如果缺少 Vite,先运行 npm ci。可以打开网站入口,也可以直达英文页或简体中文页。网站入口优先采用上次手动选择的语言,其次采用浏览器语言。两者都未匹配到支持的语言时,默认进入英文页。关闭 JavaScript 后,仍可在入口手动选择语言。Vite 支持分段读取视频,可以直接跳到所选镜头。
本地预览中的 canonical 和 hreflang 链接使用生产网址。网站入口对应 x-default。站点地图只列出两个语言页的生产网址。
- 具有 Maintain 或 Admin 权限的维护者打开官方仓库
ThinkFlowLab/OpenDirector的 Settings > Pages,在 Build and deployment 中将 Source 设为 GitHub Actions。仓库提供了 Website 工作流,其中已声明部署权限,使用 GitHub 内置令牌。 - 将网站改动合入
main。Website 会构建网站并运行 Chromium 检查,通过后部署到github-pages环境。PR 只运行检查。需要手动部署时,打开 Actions > Website > Run workflow,选择main,点击 Run workflow。 deploy成功后,分别打开网站入口、英文页和简体中文页。切换语言,确认两个平台的下载链接指向预期的 Release 附件。检查两个语言页的 canonical 是否各自指向自身,hreflang是否包含两个语言页和x-default入口,以及站点地图是否只列出两个语言页。如需回退网站,在main撤销对应改动。
- 按版本发布指南确认 Release checks 和最近一次 nightly 的
gate-parity均已通过。版本号 PR 合入main后,在该合入提交上打新的vMAJOR.MINOR.PATCH标签并推到官方仓库。标签中的版本号须与apps/desktop/package.json一致。 - Desktop release 工作流会为该标签创建或复用 Release 草稿。macOS 和 Windows 各自打包,通过本机安装和启动检查后,把安装包和对应的
.sha256文件上传到同一份草稿。两个平台都发布时,草稿应包含 Apple Silicon DMG、Windows x64 EXE 和两份校验文件。 - 维护者在各发布平台完成桌面版验收,再到 Releases 打开草稿,核对附件和英文发布说明,点击 Publish release。如果打包任务失败,在草稿状态下重跑。
- 公开 Release 后,Website 会在
main上重新构建。对每个平台,构建脚本选取包含对应架构安装包的最高正式版本。两个语言页面都使用该 Release 的下载地址、版本号和发布说明链接。如果在公开后补传了安装包,到 Actions > Website > Run workflow 选择main刷新网站即可。
如果本次只发 Windows 包,Windows 下载会更新,Mac 用户仍能下载已有的最新 Mac 包。某个平台首次发布正式安装包前,网站提供已验证的桌面测试版,并标明「测试版」。如果请求 GitHub API 失败,本次构建停止,线上继续使用上一次成功部署的页面。
OpenDirector 的安装包文件名含版本号。GitHub 的 releases/latest/download/<文件名> 只在仓库最新 Release 中查找该文件。构建时按平台查找附件,即使两个安装包来自不同标签,也能给出各自的下载地址。已安装桌面应用的升级由 #367 跟进。