Skip to content

Instantly share code, notes, and snippets.

@Joel-hanson
Last active September 13, 2018 03:32
Show Gist options
  • Save Joel-hanson/a2ade1d5957ca3afdfd67a9c380a99cf to your computer and use it in GitHub Desktop.
Save Joel-hanson/a2ade1d5957ca3afdfd67a9c380a99cf to your computer and use it in GitHub Desktop.
stages:
- deploy
deploy_prod:
stage: deploy
script:
- rm -r Web/public
- cd Web
- npm install
- gulp build && gulp generate-service-worker && gulp minify_html && gulp minify-css && gulp minify_js
- zip -r public.zip public/
- echo "Deploy to production server"
- scp -P 8822 public.zip root@{ip}:/var/www/travidux.com/Web
- ssh -p8822 root@{ip} unzip -o /var/www/travidux.com/Web/public.zip -d /var/www/travidux.com/Web/.
- echo "Deployed Successfully"
environment:
name: production
url: https://{server_name}.com
when: manual
only:
- master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment