1
0

deploy workflow
Some checks failed
Publish Pages / publish (push) Failing after 7s
Test / test (push) Has been cancelled

This commit is contained in:
Aiden
2026-06-11 16:05:20 +10:00
parent 731ee4e647
commit c86490542d
5 changed files with 202 additions and 0 deletions

View File

@@ -106,6 +106,43 @@ This builds the TypeScript player once, then serves `index.html` with Vite at a
For headset testing, the page must be a secure context before the browser will expose immersive WebXR. A LAN URL such as `http://192.168.x.x:5173/` is useful for checking layout and media loading, but it will usually not show the headset's immersive VR prompt. Use an HTTPS URL with a trusted certificate, a trusted tunnel, or a deployed CDN/Pages URL for immersive testing.
## F40 Pages deploy
This repo includes a Gitea Actions workflow at `.gitea/workflows/publish-pages.yml`. It builds the test app into `dist/` and uploads it to the shared F40 Pages R2 bucket using the layout:
```txt
sites/{site-name}/releases/{git-sha}-{run-attempt}/
sites/{site-name}/current.json
```
By default, this repo uses:
```sh
npm ci && npm run build:test-app
```
The `build:test-app` script compiles the player, copies the generated `vr180player/` CDN assets, copies the simplified `test-pages/` app, and optionally copies `media/` if that local directory exists.
Required Gitea secrets:
- `F40_PAGES_R2_ACCOUNT_ID`
- `F40_PAGES_R2_BUCKET`
- `F40_PAGES_R2_ACCESS_KEY_ID`
- `F40_PAGES_R2_SECRET_ACCESS_KEY`
Optional Gitea variables:
- `F40_PAGES_SITE_NAME`: defaults to the repository name.
- `F40_PAGES_BUILD_COMMAND`: defaults to `npm ci && npm run build:test-app`.
- `F40_PAGES_OUTPUT_DIR`: defaults to `dist`.
When the middleman router serves the current release at `https://pages.f-40.com/{site-name}/`, the generated player can also be used as a CDN from:
```html
<script type="module" src="https://pages.f-40.com/VR-Web-Player/vr180player/vr180-player.js"></script>
```
For stronger CDN caching, the router can expose immutable release URLs and use the `current.json` file only to resolve the latest release.
## Development
The player source is TypeScript in `src/vr180player/`. Generated JavaScript files in `vr180player/` are ignored by git so CI/CD can build and publish them from source.
@@ -113,6 +150,7 @@ The player source is TypeScript in `src/vr180player/`. Generated JavaScript file
npm install
npm run dev
npm run build
npm run build:test-app
```
Edit the TypeScript source files rather than generated JavaScript. A typical CI/CD publish step should run `npm ci`, `npm run build`, then publish `vr180player/` with its generated `.js` files and CSS.