From 518e1cceb9a983385105f3d314798a3aed7a6f63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Mur=C3=A7a?= Date: Thu, 22 Sep 2022 16:08:16 -0300 Subject: [PATCH] Update workflows and build scripts --- .github/workflows/deploy-dev.yml | 2 +- .github/workflows/deploy-prod.yml | 2 +- package.json | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index 740cf4a..0e2f590 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -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 diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index 6fa76db..179ee2b 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -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 diff --git a/package.json b/package.json index 2078323..bf5f7b6 100644 --- a/package.json +++ b/package.json @@ -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" },