stages: - build and deploy build and deploy: stage: build and deploy only: - main image: node:latest before_script: - apt-get update -qq && apt-get install -y rsync sshpass script: - npm install - npm run build - | sshpass -p "$PASSWORD" rsync -avz --delete \ -e "ssh -o StrictHostKeyChecking=no" \ dist/ $USERNAME@$HOST:$PROD_PATH