From d9b027f2f3fb1346e223e5aa4c91e6cb409916af Mon Sep 17 00:00:00 2001 From: Leandro Facchinetti Date: Sat, 21 Mar 2020 02:16:34 -0400 Subject: [PATCH] . --- .github/workflows/main.yml | 2 +- package.json | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ca69dc1..609137e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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' diff --git a/package.json b/package.json index 23c2d7a..56b6c53 100644 --- a/package.json +++ b/package.json @@ -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"