stages: - build - test - staging - prod build-site: stage: build image: node:18.14.1 variables: NODE_OPTIONS: "--max_old_space_size=2048" script: - cd ./src - make build-site artifacts: paths: - ./src/dist/dynamicbible build-android: stage: build image: walljm/gradle_android_node:7.5.0-jdk11-28-18 before_script: - cd ./src/android - bash ./install-sdk.sh - cd .. script: - pwd - npm ci - npm run-script build - npm run-script copy - cd android - gradle signingReport - gradle assembleRelease - gradle bundleRelease artifacts: paths: - ./src/android/app/build/outputs test: stage: test image: walljm/node-chrome-headless:18.14.1 variables: NODE_OPTIONS: "--max_old_space_size=2048" script: - cd ./src - make test needs: ["build-site"] deploy-staging: stage: staging image: google/cloud-sdk script: - cd ./src - make deploy-staging rules: - if: '$CI_COMMIT_BRANCH == "main"' when: on_success allow_failure: false needs: ["build-site"] deploy-prod-site: stage: prod image: google/cloud-sdk script: - cd ./src - make deploy-prod rules: - if: '$CI_COMMIT_BRANCH == "main"' when: manual allow_failure: false needs: ["build-site"] deploy-android: stage: prod image: walljm/gradle_android_node:7.5.0-jdk11-28-18 before_script: - cd ./src/android - bash ./install-sdk.sh - cd .. script: - pwd - npm ci - npm run-script build - npm run-script copy - cd android - gradle publishReleaseBundle artifacts: paths: - ./src/android/app/build/outputs rules: - if: '$CI_COMMIT_BRANCH == "main"' when: manual allow_failure: false needs: ["build-android"]