.gitlab-ci.yml
build:
image: node:14-slim
stage: build
only:
refs:
- develop
before_script:
- npm ci
script:
- npm run build
artifacts:
expire_in: 3 mos
paths:
- dist/
deploy:
image: alpine
stage: deploy
tags:
- nas
only:
- develop
before_script:
- apk add --no-cache rsync openssh
- mkdir -p ~/.ssh
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | ssh-add -
- ssh-keyscan quantum.agroparistech.fr >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- rsync -rav -O --no-perms --delete dist/*/ deployer@quantum.agroparistech.fr:/home/docker/prod/spoq/