Pass SSH_KEY as parameter
This commit is contained in:
parent
07756f8994
commit
1285693ac8
3 changed files with 4 additions and 4 deletions
2
.github/workflows/deploy-dev.yml
vendored
2
.github/workflows/deploy-dev.yml
vendored
|
@ -21,4 +21,4 @@ jobs:
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
- run: npm install
|
- run: npm install
|
||||||
- run: npm run build:dev
|
- run: npm run build:dev
|
||||||
- run: sh ${GITHUB_WORKSPACE}/scripts/deploy.sh dev
|
- run: sh ${GITHUB_WORKSPACE}/scripts/deploy.sh $SSH_KEY dev
|
||||||
|
|
2
.github/workflows/deploy-prod.yml
vendored
2
.github/workflows/deploy-prod.yml
vendored
|
@ -21,4 +21,4 @@ jobs:
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
- run: npm install
|
- run: npm install
|
||||||
- run: npm run build:prod
|
- run: npm run build:prod
|
||||||
- run: sh ${GITHUB_WORKSPACE}/scripts/deploy.sh prod
|
- run: sh ${GITHUB_WORKSPACE}/scripts/deploy.sh $SSH_KEY prod
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
mkdir ~/.ssh &&
|
mkdir ~/.ssh &&
|
||||||
echo "$SSH_KEY" >> ~/.ssh/id_rsa_ifsalas &&
|
echo "$1" >> ~/.ssh/id_rsa_ifsalas &&
|
||||||
chmod 400 ~/.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 &&
|
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/$1 --delete
|
rsync -avz --progress build/ ifsalas:/home/ifsalas/web/$2 --delete
|
||||||
|
|
Loading…
Reference in a new issue