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" },