Error codes + landed mode configurator support (#131) #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Builds the web firmware configurator (web/) and deploys it to GitHub Pages. | |
| # | |
| # One-time repo setup: | |
| # Settings → Pages → Build and deployment → Source = "GitHub Actions". | |
| # The site is served at https://<owner>.github.io/<repo>/ — vite.config.ts uses | |
| # base "./" (relative paths) so it works from that subpath without further config. | |
| name: Deploy web firmware configurator | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "web/**" | |
| - ".github/workflows/deploy-web.yml" | |
| # Allow manual runs from the Actions tab. | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Allow only one concurrent deployment; let an in-progress run finish. | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| defaults: | |
| run: | |
| working-directory: web | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Keep this version in sync with the Dockerfile's Bun install. | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.14 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Run tests | |
| run: bun run test | |
| # `bun run build` runs vue-tsc --noEmit then vite build, so this also typechecks. | |
| - name: Build | |
| run: bun run build | |
| - uses: actions/configure-pages@v5 | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: web/dist | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-24.04 | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 |