Setup SSH in workflow using secret
Some checks failed
Build & Deploy OS League Tools / build-and-deploy (push) Failing after 37s
Some checks failed
Build & Deploy OS League Tools / build-and-deploy (push) Failing after 37s
This commit is contained in:
@@ -37,6 +37,13 @@ jobs:
|
||||
working-directory: os-league-tools-master
|
||||
run: tar -czf build.tar.gz build/
|
||||
|
||||
- name: Setup SSH
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
ssh-keyscan -H ${{ env.FRONTEND_HOST }} >> ~/.ssh/known_hosts
|
||||
|
||||
- name: Deploy to frontend server
|
||||
run: |
|
||||
ssh sonder@${{ env.FRONTEND_HOST }} "sudo systemctl stop os-league-tools || true"
|
||||
|
||||
Reference in New Issue
Block a user