-
Notifications
You must be signed in to change notification settings - Fork 44
67 lines (55 loc) · 1.62 KB
/
Copy pathdeploy-web.yml
File metadata and controls
67 lines (55 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# 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