Update .gitlab-ci.yml
parent
fb4f5bb4e0
commit
ef8b2193c7
|
@ -8,7 +8,8 @@ image: node:8.11.4
|
||||||
|
|
||||||
setup:
|
setup:
|
||||||
only: master
|
only: master
|
||||||
tags: prod
|
tags:
|
||||||
|
- prod
|
||||||
script:
|
script:
|
||||||
- eval $(ssh-agent -s)
|
- eval $(ssh-agent -s)
|
||||||
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
|
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
|
||||||
|
@ -23,14 +24,16 @@ setup:
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
only: master
|
only: master
|
||||||
tags: prod
|
tags:
|
||||||
|
- prod
|
||||||
script:
|
script:
|
||||||
- npm run build
|
- npm run build
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
only: master
|
only: master
|
||||||
tags: prod
|
tags:
|
||||||
|
- prod
|
||||||
script:
|
script:
|
||||||
- export c=$PWD
|
- export c=$PWD
|
||||||
- ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $SSH_U@$SSH_S 'rm -rf $HOME/wbm/*'
|
- ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $SSH_U@$SSH_S 'rm -rf $HOME/wbm/*'
|
||||||
|
@ -40,7 +43,8 @@ deploy:
|
||||||
url: https://wbm.lucajaents.ch
|
url: https://wbm.lucajaents.ch
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
tags: prod
|
tags:
|
||||||
|
- prod
|
||||||
stage: cleanup
|
stage: cleanup
|
||||||
script:
|
script:
|
||||||
- rm -rf ./*
|
- rm -rf ./*
|
||||||
|
|
Loading…
Reference in New Issue