Both platform download routes now follow the provider's native latest attachment: GitHub uses `releases/latest/download/…` and Gitee uses `releases/download/latest/…`. Publishing a mirrored package no longer requires rebuilding the website to refresh a version-specific URL. Remove the build-time release API calls, metadata adapter and its obsolete tests. The main buttons read “Download” / “下载”, with “Download via Gitee” / “Gitee 备用下载” for the alternative. The film's homepage demonstration inherits the same links and copy. The website guide documents the routes and the possible delay between primary publication and mirror completion. Validation: website build and TypeScript checks; six generated latest links checked in the homepage and film demonstration; all three real Gitee latest downloads matched the GitHub package sizes and SHA-256 checksums. The release planner reports `publish: false`.
50 lines
1.1 KiB
YAML
50 lines
1.1 KiB
YAML
name: Website
|
|
|
|
on:
|
|
# Publish the website after main's checks complete.
|
|
workflow_run:
|
|
workflows: [CI]
|
|
types: [completed]
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: github-pages
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
deploy:
|
|
if: >-
|
|
github.ref == 'refs/heads/main' &&
|
|
(github.event_name == 'workflow_dispatch' || github.event.workflow_run.event == 'push')
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
ref: main
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version-file: .node-version
|
|
cache: npm
|
|
- run: npm ci
|
|
- run: npm run build:website
|
|
- uses: actions/configure-pages@v5
|
|
- uses: actions/upload-pages-artifact@v4
|
|
with:
|
|
path: build/site
|
|
retention-days: 1
|
|
- uses: actions/deploy-pages@v4
|
|
id: deployment
|