image: "engel-simulator-builder:latest" stages: - check - build - deploy cache: &global_cache paths: - target/ - www/node_modules/ check: stage: check script: - rustc --version - cargo --version - cargo fmt -- --check only: - merge_requests build-dev: stage: build cache: # inherit all global cache settings <<: *global_cache key: merge-requests script: - RUSTFLAGS=-Dwarnings wasm-pack build --dev - cd www - npm install - npm run rust-web-modules - npm run build only: - merge_requests build-release: stage: build cache: # inherit all global cache settings <<: *global_cache key: release-build script: - touch .git/HEAD - wasm-pack build - cd www - npm install - npm run rust-web-modules - npm run build artifacts: paths: - www/dist only: - master - tags deploy: stage: deploy tags: - local script: - ./ci/deploy.sh www/dist /var/www only: - master - tags