Skip to content

Instantly share code, notes, and snippets.

@marcelocmenezes
Last active June 11, 2018 14:09
Show Gist options
  • Save marcelocmenezes/4cd5ee10bebf3c5b596a0e77b14426be to your computer and use it in GitHub Desktop.
Save marcelocmenezes/4cd5ee10bebf3c5b596a0e77b14426be to your computer and use it in GitHub Desktop.
#!/bin/sh
# inpath - verify that a specified program is either valid as-is,
# or can be found in the PATH directory list.
if [ -d '~/www' ]; then
echo -e "Excluindo arquivos antigos."
rm -R ~/www
fi
echo -e "Clonando projeto do repositorio remoto"
git clone git@bitbucket.org:jurosbaixo/api-juros-baixos.git ~/www
cd ~/www
echo -e "Instalando dependencias"
npm install
echo -e "reiniciando servicos"
pm2 restart all
echo -e "deploy realizado com sucesso"; exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment