Update workflows and build scripts

This commit is contained in:
Leonardo Murça 2022-09-22 16:08:16 -03:00
parent 71621cbb0d
commit 518e1cceb9
3 changed files with 4 additions and 2 deletions

View file

@ -24,5 +24,5 @@ jobs:
- run: chmod 400 ~/.ssh/id_rsa_ifsalas
- run: echo -e "Host ifsalas\n\tUser ifsalas\n\tHostname 45.76.5.44\n\tIdentityFile ~/.ssh/id_rsa_ifsalas\n\tStrictHostKeyChecking No" >> ~/.ssh/config
- run: npm install
- run: npm run build
- run: npm run build:dev
- run: npm run deploy:dev

View file

@ -24,5 +24,5 @@ jobs:
- run: chmod 400 ~/.ssh/id_rsa_ifsalas
- run: echo -e "Host ifsalas\n\tUser ifsalas\n\tHostname 45.76.5.44\n\tIdentityFile ~/.ssh/id_rsa_ifsalas\n\tStrictHostKeyChecking No" >> ~/.ssh/config
- run: npm install
- run: npm run build
- run: npm run build:prod
- run: npm run deploy:prod

View file

@ -29,6 +29,8 @@
"eject": "react-scripts eject",
"start:dev": "env-cmd -f .env.dev npm run start",
"start:prod": "env-cmd -f .env.prod npm run start ",
"build:dev": "env-cmd -f .env.dev npm run build",
"build:prod": "env-cmd -f .env.prod npm run build",
"deploy:prod": "rsync -avz --progress build/ ifsalas:/home/ifsalas/web/prod --delete",
"deploy:dev": "rsync -avz --progress build/ ifsalas:/home/ifsalas/web/dev --delete"
},