fuzzyworld

nordic-skating / mistral-medium-35-littlejs / files / .gitlab-ci.yml

Branch mistral-medium-35-littlejs · default branch · all branches

.gitlab-ci.yml

827 B · history · blame

1image: node:22
2
3stages: [test, deploy]
4
5test:
6 stage: test
7 script:
8 - npm ci
9 - npm test
10 - npm run build
11
12pages:
13 stage: deploy
14 script:
15 - npm ci
16 - npm run build
17 # GitLab Pages requires the artifact to be a directory named `public`. There is no
18 # `public/` in the repository (vite.config.ts), so this is a rename, not a nest.
19 - mv dist public
20 # Fail loudly rather than publishing a 404.
21 - test -f public/index.html || (echo "no index.html at artifact root" && exit 1)
22 # Without these two the site still works and can no longer be installed.
23 - test -f public/manifest.webmanifest || (echo "no web manifest" && exit 1)
24 - test -f public/sw.js || (echo "no service worker" && exit 1)
25 artifacts:
26 paths: [public]
27 rules:
28 - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH