name: Reference site on: push: branches: [main] pull_request: workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Checkout pinned Rust source run: | git clone https://gitea.hareworks.net/Hare/wip-rs ../wip-rs git -C ../wip-rs checkout "$(python3 -c 'import json; print(json.load(open("site/rust-source.json"))["revision"])')" - uses: dtolnay/rust-toolchain@stable with: toolchain: '1.97.1' targets: wasm32-unknown-unknown components: rustfmt, clippy - name: Install matching WASM bindings tool run: cargo install wasm-bindgen-cli --version 0.2.121 --locked - uses: actions/setup-node@v4 with: node-version: '24' cache: npm cache-dependency-path: site/package-lock.json - name: Install working-directory: site run: npm ci - name: Check and build working-directory: site run: npm run verify - name: Validate generated Worldspace and Rust bridge working-directory: site run: | WIP_TEST_GENERATED=1 node --test tests/worldspace-data.test.mjs cargo fmt --all -- --check cargo test --workspace --locked -- --include-ignored cargo clippy --workspace --all-targets --locked -- -D warnings - name: Browser smoke tests working-directory: site run: | npx playwright install --with-deps chromium npm run test:browser npm run test:dev - name: Verify subpath deployment working-directory: site run: | SITE_BASE=/reference SITE_URL=https://example.test npm run verify SITE_BASE=/reference SITE_URL=https://example.test npm run test:browser SITE_BASE=/reference SITE_URL=https://example.test npm run test:dev - name: Build deployment artifact working-directory: site env: SITE_URL: ${{ vars.SITE_URL }} SITE_BASE: ${{ vars.SITE_BASE }} run: npm run build && npm run check:links # Gitea uses the v3 artifact protocol, not GitHub's v4 artifact service. - uses: actions/upload-artifact@v3 with: name: wip-reference-site path: site/dist/ if-no-files-found: error