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"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: webfactory/ssh-agent@v0.9.1
|
||||
- name: ssh key
|
||||
run: |
|
||||
echo "${{ secrets.SSH_MASTER_KEY }}" > ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
- uses: LuisEnMarroquin/setup-ssh-action@v2.0.5
|
||||
with:
|
||||
ssh-private-key: ${{ secrets.SSH_MASTER_KEY }}
|
||||
SSHKEY: ${{ secrets.SSH }}
|
||||
- name: deploy
|
||||
run: |
|
||||
# echo LS1
|
||||
|
@ -62,3 +66,8 @@ jobs:
|
|||
ssh root@$NODE systemctl restart node-api
|
||||
done
|
||||
|
||||
- name: Clean up
|
||||
run: |
|
||||
rm ~/.ssh/id_ed25519
|
||||
if: always()
|
||||
|
||||
|
|
Loading…
Reference in a new issue