forked from Mirrors/gomuks
ci: build frontend
This commit is contained in:
parent
1a359f9793
commit
3b2ae2d625
2 changed files with 28 additions and 0 deletions
2
.github/workflows/go.yml
vendored
2
.github/workflows/go.yml
vendored
|
@ -27,6 +27,8 @@ jobs:
|
|||
go install honnef.co/go/tools/cmd/staticcheck@latest
|
||||
pip install pre-commit
|
||||
export PATH="$HOME/go/bin:$PATH"
|
||||
mkdir -p web/dist
|
||||
touch web/dist/empty
|
||||
|
||||
- name: Build
|
||||
run: go build -v ./...
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
stages:
|
||||
- frontend
|
||||
- build
|
||||
|
||||
default:
|
||||
|
@ -10,6 +11,23 @@ cache:
|
|||
paths:
|
||||
- .cache
|
||||
|
||||
frontend:
|
||||
image: node:22-alpine
|
||||
stage: frontend
|
||||
variables:
|
||||
NODE_ENV: "production"
|
||||
cache:
|
||||
paths:
|
||||
- web/node_modules
|
||||
script:
|
||||
- cd web
|
||||
- npm install
|
||||
- npm run build
|
||||
artifacts:
|
||||
paths:
|
||||
- web/dist
|
||||
expire_in: 1 hour
|
||||
|
||||
.build-linux: &build-linux
|
||||
stage: build
|
||||
before_script:
|
||||
|
@ -19,6 +37,10 @@ cache:
|
|||
artifacts:
|
||||
paths:
|
||||
- gomuks
|
||||
dependencies:
|
||||
- build frontend
|
||||
needs:
|
||||
- build frontend
|
||||
|
||||
linux/amd64:
|
||||
<<: *build-linux
|
||||
|
@ -62,3 +84,7 @@ macos/arm64:
|
|||
paths:
|
||||
- gomuks
|
||||
- libolm.3.dylib
|
||||
dependencies:
|
||||
- build frontend
|
||||
needs:
|
||||
- build frontend
|
||||
|
|
Loading…
Add table
Reference in a new issue