From ab1dfde64d6b70b9a9fbca1f816eb321a7d0bdc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Mur=C3=A7a?= Date: Tue, 1 Nov 2022 11:50:07 -0300 Subject: [PATCH] Update pipeline --- .github/workflows/deploy-dev.yml | 6 +++++- .github/workflows/deploy-prod.yml | 6 +++++- scripts/deploy.sh | 7 ------- 3 files changed, 10 insertions(+), 9 deletions(-) delete mode 100644 scripts/deploy.sh diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index 2d61d35..6b3cc90 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -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 diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index 6aaf6c1..cde31be 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -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 diff --git a/scripts/deploy.sh b/scripts/deploy.sh deleted file mode 100644 index 6293116..0000000 --- a/scripts/deploy.sh +++ /dev/null @@ -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