This commit is contained in:
Leandro Facchinetti 2020-03-21 02:16:34 -04:00
parent aa65751785
commit d9b027f2f3
2 changed files with 3 additions and 5 deletions

View File

@ -12,5 +12,5 @@ jobs:
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
if: github.ref == 'refs/heads/master'
- run: npm run deploy
- run: npx pm2 deploy package.json production
if: github.ref == 'refs/heads/master'

View File

@ -1,9 +1,7 @@
{
"scripts": {
"start": "concurrently \"tsc --watch\" \"nodemon lib\"",
"test": "tsc && jest && prettier --check 'src/**'",
"deploy": "pm2 deploy package.json production",
"deploy:start": "pm2 startOrRestart package.json"
"test": "tsc && jest && prettier --check 'src/**'"
},
"dependencies": {
"caddy-npm": "^2.0.0-beta.18",
@ -62,7 +60,7 @@
"path": "/root/www.kill-the-newsletter.com",
"pre-setup": "(curl -sL https://deb.nodesource.com/setup_13.x | bash -) && apt install -y nodejs build-essential && (ssh -o StrictHostKeyChecking=no git@github.com || true)",
"pre-deploy-local": "rsync -av --delete lib/ root@kill-the-newsletter.com:www.kill-the-newsletter.com/current/lib/",
"post-deploy": "env NODE_ENV=production npm ci && npm deploy:start",
"post-deploy": "env NODE_ENV=production npm ci && npx pm2 startOrRestart package.json",
"ssh_options": [
"ForwardAgent=yes",
"StrictHostKeyChecking=no"