Update pipeline

This commit is contained in:
Leonardo Murça 2022-11-01 11:50:07 -03:00
parent 1285693ac8
commit ab1dfde64d
3 changed files with 10 additions and 9 deletions

View file

@ -21,4 +21,8 @@ jobs:
cache: 'npm'
- run: npm install
- run: npm run build:dev
- run: sh ${GITHUB_WORKSPACE}/scripts/deploy.sh $SSH_KEY dev
- run: mkdir ~/.ssh
- run: echo "$SSH_KEY" >> ~/.ssh/id_rsa_ifsalas
- 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: rsync -avz --progress build/ ifsalas:/home/ifsalas/web/dev --delete

View file

@ -21,4 +21,8 @@ jobs:
cache: 'npm'
- run: npm install
- run: npm run build:prod
- run: sh ${GITHUB_WORKSPACE}/scripts/deploy.sh $SSH_KEY prod
- run: mkdir ~/.ssh
- run: echo "$SSH_KEY" >> ~/.ssh/id_rsa_ifsalas
- 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: rsync -avz --progress build/ ifsalas:/home/ifsalas/web/prod --delete

View file

@ -1,7 +0,0 @@
#!/bin/sh
mkdir ~/.ssh &&
echo "$1" >> ~/.ssh/id_rsa_ifsalas &&
chmod 400 ~/.ssh/id_rsa_ifsalas &&
echo -e "Host ifsalas\n\tUser ifsalas\n\tHostname 45.76.5.44\n\tIdentityFile ~/.ssh/id_rsa_ifsalas\n\tStrictHostKeyChecking No" >> ~/.ssh/config &&
rsync -avz --progress build/ ifsalas:/home/ifsalas/web/$2 --delete