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`.
5.7 KiB
Public website
The website source is site/. It explains Piik; it does not run rooms, signaling
or media. The public introduction guide owns
its content and design boundary.
Public Destinations
| Entry | Destination |
|---|---|
| Website | piik.tv |
| P2P-only demo on the separate US server | demo.piik.tv |
| App downloads and release notes | GitHub Releases |
| Download mirror for domestic access | Gitee Releases |
| Documentation index | Repository documentation |
These public destinations are live. GitHub Pages serves piik.tv behind
Cloudflare; both the GitHub origin and Cloudflare edge use HTTPS. Website DNS is
proxied with strict origin TLS verification and origin cache headers respected.
Demo DNS remains unproxied so its UDP listeners stay reachable.
GitHub Pages can serve the complete website: it hosts static HTML, CSS and JavaScript. The demo also needs the Go service for room authority, WebSocket signaling and UDP STUN, so it runs on the separate US server rather than Pages.
Public Demo Configuration
The chosen demo allows entry without a site password and provides P2P sharing without SFU fallback. Use the self-hosting runbook with:
PIIK_ENV=production
LISTEN_HOST=127.0.0.1
PORT=8787
PUBLIC_BASE_URL=https://demo.piik.tv
ALLOWED_ORIGINS=https://demo.piik.tv
SITE_ACCESS_PASSWORD=
ROOM_DATABASE_PATH=/var/lib/piik/rooms.sqlite
MAX_VIEWERS_PER_ROOM=20
STUN_URLS=stun:demo.piik.tv:3478
NAT_PREDICTION_ENABLED=true
SFU_UDP_PORT=
Point demo.piik.tv directly at the US server so UDP reaches its STUN listeners;
allow UDP 3478/3479/3480 and terminate HTTPS/WSS at Caddy. The demo uses the
standard systemd service, with its release
under /opt/piik/current and configuration at /etc/piik/piik.env. The service
unit provides the SQLite state directory. Room ownership, invitations and private-room
admission still apply. The configuration reference
owns each setting and its bounds.
For updates, verify the release descriptor and manifest before placing a new
release under /opt/piik/releases/. Stop Piik, back up its SQLite state, switch
current to the verified release, and restart. Check local/public health,
WebSocket room access and STUN. Keep the previous release and state backup until
acceptance; restore both with Piik stopped if rollback is needed. The nginx-specific
maintainer wrapper does not manage this Caddy installation.
Preview
With the repository's development dependencies installed:
npm run build:website
npm run preview:website
Open http://127.0.0.1:18890. Rebuild after editing source. The build bundles the
film's real product components into an isolated demonstration frame; publishing
build/site/ needs no Node runtime or backend. Vite preview supplies HTTP byte
ranges for seeking the soundtrack. Keep asset links relative so both a custom
domain and GitHub's /Piik/ project path work.
The Windows x64, macOS Apple silicon and Linux x64 cards use fixed filenames and each provider's native latest-attachment route:
- GitHub:
releases/latest/download/asset-name.zip(documentation). - Gitee:
releases/download/latest/asset-name.zip(Windows download).
Both links follow provider publication without a website rebuild or a release API request from the build or visitor. Buttons say “Download” / “下载”; the secondary link names Gitee. Keep versions and archive formats out of these labels. Versioning owns package verification and completion of mirror publication. GitHub remains the primary source; the Gitee download can temporarily lag while a mirror publication completes. Verify the latest redirects and package checksums after releases.
Publish
- Verify the public copy and destinations above, publish the release artifacts and open the source repository as part of the approved public launch.
- In repository Settings > Pages, choose GitHub Actions as the source.
Use the dedicated Pages workflow, not publication of the repository root or
all of
docs/, which includes developer research and operational reference. - Set the approved
piik.tvcustom domain in Pages settings and configure its DNS using GitHub's current domain instructions. Actions publishing does not need aCNAMEfile in the source tree. - Accepted main pushes run CI first; its completion triggers Website, which
checks out current main. Manual Website dispatch from
mainrepublishes the site when needed. Download links resolve through each provider, so publishing a package or retrying its mirror needs no link refresh. Onlybuild/site/is uploaded; website work does not package App/Server. Verify HTTPS, both languages, relative assets and per-platform download links.
Branch/PR pushes do not deploy. The workflow does not change DNS; the private production site and the US P2P-only demo remain separate deployments.
For rollback, dispatch the previously accepted site revision from a reviewed
revert on main; runtime App/Server binaries and databases are unaffected.