tower / interior-flight / files / .gitlab-ci.yml
Branch interior-flight · default branch · all branches
.gitlab-ci.yml
| 1 | image: node:22 |
| 2 | |
| 3 | stages: [test, deploy] |
| 4 | |
| 5 | test: |
| 6 | stage: test |
| 7 | script: |
| 8 | - npm ci |
| 9 | - npm test |
| 10 | - npm run build |
| 11 | |
| 12 | pages: |
| 13 | stage: deploy |
| 14 | script: |
| 15 | - npm ci |
| 16 | - npm run build |
| 17 | - mv dist public |
| 18 | # Fail loudly rather than publishing a 404. `mv` silently nests when the |
| 19 | # destination exists, which is exactly how this broke the first time. |
| 20 | - test -f public/index.html || (echo "no index.html at artifact root" && exit 1) |
| 21 | artifacts: |
| 22 | paths: [public] |
| 23 | rules: |
| 24 | - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH |