-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
31 lines (27 loc) · 862 Bytes
/
.gitlab-ci.yml
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
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
image: node:lts
# This folder is cached between builds
# https://docs.gitlab.com/ee/ci/yaml/index.html#cache
# cache:
# paths:
# - node_modules/
# disable the old jobs/cache config, replaced by new docker deployment
.lint:
script: |
npm ci
npm run lint
.build_deploy:
before_script:
- apt-get update -y && apt-get install -y rsync
- chmod 600 ${SSH_KEY}
script: |
npm ci
npm run build:apache
rsync -av --del dist/ml-website/ -e "ssh -i ${SSH_KEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" ${SSH_USER}@${DEPLOY_HOST}:{TARGET_DIR}
build_deploy:
image: docker:20.10.22
only:
- master
script: |
docker-compose -f docker-compose.ki-labor.yml up --force-recreate --build -d