line-and-surface/.gitlab-ci.yml

32 lines
607 B
YAML
Raw Normal View History

2021-01-10 12:35:05 +01:00
stages:
- build
- deploy
2021-01-09 21:53:06 +01:00
build site:
image: node:lts
stage: build
script:
2021-04-09 20:23:22 +02:00
- npm ci --cache .npm --prefer-offline
2021-01-09 21:53:06 +01:00
- npm run build
2021-04-09 20:23:22 +02:00
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
2021-05-16 21:33:59 +02:00
- .npm
2021-01-09 21:53:06 +01:00
artifacts:
paths:
2021-05-16 21:33:59 +02:00
- dist
2021-01-10 12:35:05 +01:00
deploy site:
image: instrumentisto/rsync-ssh
stage: deploy
2021-04-09 17:49:02 +02:00
only:
refs:
- master
2021-01-10 12:35:05 +01:00
script:
- mkdir ~/.ssh
- echo "$SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
2021-05-16 21:33:59 +02:00
- rsync -vr -e "ssh -p ${SSH_PORT}" dist/ "${DEPLOY_DEST}"