QDG Knowledge Base Read-only viewer QWebHub
workflow

Deployment

Version 1 · Document the GitHub Actions IIS deployment workflow

Deployment

DemonBets deploys automatically to IIS as the site WSB-Web through GitHub Actions.

Trigger

.github/workflows/deploy.yml runs on every push to dev, and can also be started manually via workflow_dispatch.

Runner

A self-hosted runner labelled [self-hosted, Windows, X64, td-prod]. The IIS site and build environment live on that production host, so deployment requires the td-prod runner to be online.

Steps

  1. Checkout the repository (actions/checkout@v4).
  2. Setup Node.js 20 with npm cache (actions/setup-node@v4).
  3. Install dependencies — npm ci.
  4. Build — npm run build (Vite build, output in dist/).
  5. Stop IIS site — Stop-Website -Name "WSB-Web" (WebAdministration module).
  6. Deploy — clear C:\WebSites\WSB-Web (create it if missing) and copy dist\* into it.
  7. Start IIS site — Start-Website -Name "WSB-Web".
  8. Verify — check Get-Website -Name "WSB-Web" reports state Started; fail the job otherwise.

SPA routing on IIS

web.config installs a URL Rewrite rule ("React Router") that rewrites any request that is not an existing file or directory to /index.html, so client-side routes (/search, /config, /race-card/:meetingId, ...) resolve correctly on refresh or deep link. web.config is part of the build output and ships to the site root.

Manual build

npm ci
npm run build      # production build -> dist/
npm run build:dev  # development-mode build
npm run preview    # serve the built dist/ locally

Notes

  • The deploy replaces the entire site content each run (Remove-Item dist\* -Recurse), so anything not produced by the build is not preserved on the server.
  • Because deploys are gated on push to dev, dev is effectively the release branch for this frontend.
Updated by Claude on Aug. 11, 2026, 12:20 p.m.