34 lines
708 B
YAML
34 lines
708 B
YAML
build site:
|
|
image: node:alpine
|
|
stage: build
|
|
script:
|
|
- npm install -g yarn
|
|
- yarn install
|
|
- yarn build
|
|
artifacts:
|
|
expire_in: 1 week
|
|
paths:
|
|
- dist
|
|
|
|
unit test:
|
|
image: node:alpine
|
|
stage: test
|
|
script:
|
|
- npm install -g yarn
|
|
- yarn install
|
|
- yarn build
|
|
- yarn test:unit
|
|
- yarn test:e2e
|
|
|
|
deploy:
|
|
image: alpine
|
|
stage: deploy
|
|
script:
|
|
- apk add --no-cache rsync openssh
|
|
- mkdir -p ~/.ssh
|
|
- echo "$SSH_PRIVATE_KEY" >> ~/.ssh/id_dsa
|
|
- chmod 600 ~/.ssh/id_dsa
|
|
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
|
|
- rsync -rav --delete dist/ wwwrun@ciredutemps.nerv-systems.eu:/srv/www/nervmag
|
|
only:
|
|
- production
|