Improve and fix deploy to prod
This commit is contained in:
parent
4685ba6876
commit
7da7c0841a
2 changed files with 5 additions and 4 deletions
6
.github/workflows/deploy-prod.yml
vendored
6
.github/workflows/deploy-prod.yml
vendored
|
@ -19,11 +19,11 @@ jobs:
|
|||
with:
|
||||
node-version: 16
|
||||
cache: 'npm'
|
||||
- run: npm install
|
||||
- run: npm run build
|
||||
- run: mkdir ~/.ssh
|
||||
- run: 'echo "$SSH_KEY" >> ~/.ssh/id_ed25519_ifsalas'
|
||||
- run: chmod 400 ~/.ssh/id_ed25519_ifsalas
|
||||
- run: echo -e "Host ifsalas\n\tUser ifsalas\n\tHostname 45.76.5.44\n\tIdentityFile ~/.ssh/id_ed25519_ifsalas\n\tStrictHostKeyChecking No" >> ~/.ssh/config
|
||||
- run: rsync -rLtvz build/ ifsalas:/home/ifsalas/web/prod
|
||||
- run: npm install
|
||||
- run: npm run build
|
||||
- run: npm run deploy:prod
|
||||
- run: ssh ifsalas "pm2 reload all"
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject"
|
||||
"eject": "react-scripts eject",
|
||||
"deploy:prod": "rsync -avz --progress build/ ifsalas:/home/ifsalas/web/prod"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
|
|
Loading…
Reference in a new issue