Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
StaticFX committed Jan 2, 2025
1 parent cfd9ecb commit 69b9ed0
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,18 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up SSH agent
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Add server's SSH public key to known_hosts
- name: Add server's SSH private key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
- name: Add server's SSH public key to known_hosts
run: |
mkdir -p ~/.ssh
ssh-keyscan -H ${{secrets.SERVER_HOST}} >> ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts
- name: Deploy application
run: |
ssh -i ~/.ssh/id_ed25519 -p ${{secrets.SERVER_SSH_PORT}} ${{secrets.SERVER_SSH_USERNAME}}@${{secrets.SERVER_HOST}} "your deployment commands here"

0 comments on commit 69b9ed0

Please sign in to comment.