Skip to content

Instantly share code, notes, and snippets.

@bigbeno37
Created August 9, 2019 14:07
Show Gist options
  • Save bigbeno37/e84a93bbdc466dff979dd23b554434b4 to your computer and use it in GitHub Desktop.
Save bigbeno37/e84a93bbdc466dff979dd23b554434b4 to your computer and use it in GitHub Desktop.
Gitlab auto deploy
image: node:lts
before_script:
- eval $(ssh-agent -s)
- ssh-add <(echo "$VPS_KEY")
- mkdir -p ~/.ssh
cache:
paths:
- node_modules/
install_dependencies:
stage: build
script:
- npm install
artifacts:
paths:
- node_modules
testing_testing:
stage: test
script: npm test
deploy:
stage: deploy
script:
- ssh -v -o StrictHostKeyChecking=no [email protected] "cd /root/pcpartreviewer && git pull"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment