diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index ee71f45..e845454 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -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 ./... diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 11d0782..fe49ea0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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