This commit is contained in:
Leandro Facchinetti 2020-08-04 22:47:58 +01:00
parent b9907a8021
commit 5a7c99b532
5 changed files with 10 additions and 7 deletions

View File

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

2
.vscode/tasks.json vendored
View File

@ -5,7 +5,7 @@
"tasks": [ "tasks": [
{ {
"type": "npm", "type": "npm",
"script": "start", "script": "develop",
"group": { "group": {
"kind": "build", "kind": "build",
"isDefault": true "isDefault": true

View File

@ -18,4 +18,4 @@ ENV ISSUE_REPORT=mailto:kill-the-newsletter@leafac.com
EXPOSE 8000 EXPOSE 8000
EXPOSE 2525 EXPOSE 2525
CMD npx ts-node . CMD npm start

View File

@ -70,7 +70,7 @@
```console ```console
$ ssh-add $ ssh-add
$ npx pm2 deploy package.json production setup $ npm run deploy:setup
``` ```
12. Migrate the existing feeds (if any): 12. Migrate the existing feeds (if any):

View File

@ -1,7 +1,10 @@
{ {
"scripts": { "scripts": {
"start": "open-cli http://localhost:8000 && nodemon --ext ts --exec 'ts-node .'", "start": "ts-node .",
"test": "prettier --check '**/*.{ts,css}' && jest" "develop": "open-cli http://localhost:8000 && nodemon --ext ts --exec 'ts-node .'",
"test": "prettier --check '**/*.{ts,css}' && jest",
"deploy": "pm2 deploy package.json production",
"deploy:setup": "pm2 deploy package.json production setup"
}, },
"dependencies": { "dependencies": {
"@types/express": "^4.17.3", "@types/express": "^4.17.3",
@ -44,7 +47,7 @@
"apps": [ "apps": [
{ {
"name": "kill-the-newsletter", "name": "kill-the-newsletter",
"script": "ts-node .", "script": "npm start",
"env": { "env": {
"NODE_ENV": "production", "NODE_ENV": "production",
"WEB_PORT": "8000", "WEB_PORT": "8000",