Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
StaticFX committed Jan 3, 2025
1 parent 0d95f84 commit d4f51d7
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- 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
echo "${{ secrets.SERVER_PUBLIC_KEY }}" >> ~/.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"
- name: executing remote ssh commands using password
uses: appleboy/[email protected]
with:
host: ${{ secrets.SERVER_HOST }}
username: github
password: ${{ secrets.SERVER_PASSWORD }}
port: ${{ secrets.SERVER_SSH_PORT }}
script: whoami

0 comments on commit d4f51d7

Please sign in to comment.