Setup SSH key
This commit is contained in:
parent
3a69a9fef7
commit
0ae4e420f3
1 changed files with 12 additions and 3 deletions
|
@ -41,9 +41,13 @@ jobs:
|
||||||
NODES: "192.168.15.160"
|
NODES: "192.168.15.160"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: webfactory/ssh-agent@v0.9.1
|
- name: ssh key
|
||||||
with:
|
run: |
|
||||||
ssh-private-key: ${{ secrets.SSH_MASTER_KEY }}
|
echo "${{ secrets.SSH_MASTER_KEY }}" > ~/.ssh/id_ed25519
|
||||||
|
chmod 600 ~/.ssh/id_ed25519
|
||||||
|
- uses: LuisEnMarroquin/setup-ssh-action@v2.0.5
|
||||||
|
with:
|
||||||
|
SSHKEY: ${{ secrets.SSH }}
|
||||||
- name: deploy
|
- name: deploy
|
||||||
run: |
|
run: |
|
||||||
# echo LS1
|
# echo LS1
|
||||||
|
@ -62,3 +66,8 @@ jobs:
|
||||||
ssh root@$NODE systemctl restart node-api
|
ssh root@$NODE systemctl restart node-api
|
||||||
done
|
done
|
||||||
|
|
||||||
|
- name: Clean up
|
||||||
|
run: |
|
||||||
|
rm ~/.ssh/id_ed25519
|
||||||
|
if: always()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue