when-am-i / files / .fw-ci.yml
.fw-ci.yml
| 1 | # The Docker image that will be used to build your app |
| 2 | image: node:lts |
| 3 | |
| 4 | stages: |
| 5 | - test |
| 6 | - deploy |
| 7 | |
| 8 | # Lint, type-check and unit-test on every pipeline. A failure here blocks the |
| 9 | # deploy stage, so broken code can never reach GitLab Pages. |
| 10 | test: |
| 11 | stage: test |
| 12 | script: |
| 13 | - npm ci |
| 14 | - npm run validate:data |
| 15 | - npm run lint |
| 16 | - npm run typecheck |
| 17 | - npm test |
| 18 | # Fail if the README badge block is out of sync with the repo (run |
| 19 | # `npm run gen:badges` and commit the result to fix). |
| 20 | - npm run gen:badges -- --check |
| 21 | |
| 22 | create-pages: |
| 23 | stage: deploy |
| 24 | pages: |
| 25 | # The folder that contains the files to be exposed at the Page URL |
| 26 | publish: dist |
| 27 | rules: |
| 28 | # This ensures that only pushes to the default branch will trigger |
| 29 | # a pages deploy |
| 30 | - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH |
| 31 | script: |
| 32 | - npm ci |
| 33 | - npm run build |