-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
41 lines (39 loc) · 892 Bytes
/
.gitlab-ci.yml
File metadata and controls
41 lines (39 loc) · 892 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
stages:
- build
- deploy
# build stage
build_app:
image: node:10.15.0-stretch
stage: build
only:
refs:
- master
variables:
- $CI_COMMIT_MESSAGE =~ /trigger ci/
script:
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- export PATH=~/.cargo/bin:$PATH
- curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- npm install
- npm run build
cache:
paths:
- node_modules/
artifacts:
paths:
# build folder
- dist/
expire_in: 1 hour
# production stage
production:
image: python:latest
stage: deploy
only:
refs:
- master
variables:
- $CI_COMMIT_MESSAGE =~ /trigger ci/
script:
- pip install awscli
- aws s3 rm s3://"$S3BUCKET" --recursive
- aws s3 sync ./dist s3://"$S3BUCKET"