Skip to content

Instantly share code, notes, and snippets.

@matheusdavidson
Created May 25, 2017 16:12
Show Gist options
  • Save matheusdavidson/f70a81d35cc16f71872bafc4927b1e76 to your computer and use it in GitHub Desktop.
Save matheusdavidson/f70a81d35cc16f71872bafc4927b1e76 to your computer and use it in GitHub Desktop.
#!/bin/sh
ROOT="/var/www/trilpoker"
rm -rfv "$ROOT/.painel.build";
mkdir "$ROOT/.painel.build";
cd "$ROOT/.painel.build";
git init;
git remote add deploy ssh://[email protected]/var/www/dashboard/repo/;
cd "$ROOT/painel";
NODE_ENV=production npm run build --env="production";
rm -rfv "$ROOT/.painel.build/"*;
cp -rfv dist "$ROOT/.painel.build";
cp server.js "$ROOT/.painel.build";
cp package.json "$ROOT/.painel.build";
cd "$ROOT/.painel.build";
git add -A;
git commit -am "new painel build";
git push --force deploy master;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment