north-star / files / .fw-ci.yml
.fw-ci.yml
7fff149a 2026-03-14 Pavel Safronov | 1 | # The Docker image that will be used to build your app |
4e701dc7 2026-03-16 Pavel Safronov | 2 | image: node:24-alpine |
7fff149a 2026-03-14 Pavel Safronov | 3 | create-pages: |
| 4 | pages: | |
| 5 | # The folder that contains the files to be exposed at the Page URL | |
| 6 | publish: public | |
| 7 | rules: | |
c18940ae 2026-03-16 Pavel Safronov | 8 | # Only pushes to default branch should trigger a pages deploy. |
| 9 | - if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH | |
4e701dc7 2026-03-16 Pavel Safronov | 10 | before_script: |
| 11 | - npm ci | |
7fff149a 2026-03-14 Pavel Safronov | 12 | script: |
500aec95 2026-03-15 Pavel Safronov | 13 | - echo "Building North Star from commit ${CI_COMMIT_SHORT_SHA}..." |
10582142 2026-03-16 Pavel Safronov | 14 | - mkdir -p public |
07aa3903 2026-03-16 Pavel Safronov | 15 | - npm run gen-commit-ts |
4e701dc7 2026-03-16 Pavel Safronov | 16 | - npm run build |
c18940ae 2026-03-16 Pavel Safronov | 17 | |
| 18 | cleanup-stale-rooms-weekly: | |
| 19 | rules: | |
| 20 | # This job runs only from a configured GitLab pipeline schedule. | |
| 21 | - if: $CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH | |
| 22 | # Allow manual run from "Run pipeline" UI on default branch. | |
| 23 | - if: $CI_PIPELINE_SOURCE == "web" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH | |
| 24 | when: manual | |
| 25 | allow_failure: false | |
| 26 | before_script: | |
7877c7bc 2026-03-16 Pavel Safronov | 27 | - 'test -n "$FIREBASE_TOKEN" || (echo "ERROR: FIREBASE_TOKEN is not set. Add it in GitLab: Settings > CI/CD > Variables." >&2; exit 1)' |
c18940ae 2026-03-16 Pavel Safronov | 28 | - apk add --no-cache bash jq |
| 29 | - npm ci | |
| 30 | script: | |
| 31 | - echo "Running weekly Firebase stale-room cleanup..." | |
| 32 | - npm run clean-old-firebase:preview-30d | |
| 33 | - npm run clean-old-firebase:run-30d | |
| 34 | variables: | |
| 35 | FIREBASE_PROJECT: north-star-e5dee | |
| 36 | FIREBASE_RTDB_INSTANCE: north-star-e5dee-default-rtdb |