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:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
if: github.ref == 'refs/heads/master'
- run: npx pm2 deploy package.json production
- run: npm run deploy
if: github.ref == 'refs/heads/master'

2
.vscode/tasks.json vendored
View File

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

View File

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

View File

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

View File

@ -1,7 +1,10 @@
{
"scripts": {
"start": "open-cli http://localhost:8000 && nodemon --ext ts --exec 'ts-node .'",
"test": "prettier --check '**/*.{ts,css}' && jest"
"start": "ts-node .",
"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": {
"@types/express": "^4.17.3",
@ -44,7 +47,7 @@
"apps": [
{
"name": "kill-the-newsletter",
"script": "ts-node .",
"script": "npm start",
"env": {
"NODE_ENV": "production",
"WEB_PORT": "8000",