fuzzyworld

north-star / mobile / files / .gitlab-ci.yml

Branch mobile · default branch · all branches

.gitlab-ci.yml

1.4 KB · history · blame

1# The Docker image that will be used to build your app
2image: node:24-alpine
3create-pages:
4 pages:
5 # The folder that contains the files to be exposed at the Page URL
6 publish: public
7 rules:
8 # Only pushes to default branch should trigger a pages deploy.
9 - if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
10 before_script:
11 - npm ci
12 script:
13 - echo "Building North Star from commit ${CI_COMMIT_SHORT_SHA}..."
14 - mkdir -p public
15 - npm run gen-commit-ts
16 - npm run build
17
18cleanup-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:
27 - 'test -n "$FIREBASE_TOKEN" || (echo "ERROR: FIREBASE_TOKEN is not set. Add it in GitLab: Settings > CI/CD > Variables." >&2; exit 1)'
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