14 lines
639 B
YAML
14 lines
639 B
YAML
deploy-site:
|
|
stage: deploy
|
|
before_script:
|
|
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
|
|
- eval $(ssh-agent -s)
|
|
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
|
|
- mkdir -p ~/.ssh
|
|
- chmod 700 ~/.ssh
|
|
- echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
|
|
- chmod 644 ~/.ssh/known_hosts
|
|
|
|
script:
|
|
- echo "Connecting to proxmox machine"
|
|
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S website-firq-npx kill; rm -r -f public/*; cd build; git pull; rm -r -f node_modules; npm install; npm run build; cp -R public ~; cd ~; screen -S website-firq-npx -dm npx serve public/ -p 9000" |