Skip to content

Instantly share code, notes, and snippets.

@3mrdev
Last active June 7, 2021 12:43
Show Gist options
  • Save 3mrdev/266d09a5d5b8b7fffe7805b273cb2e52 to your computer and use it in GitHub Desktop.
Save 3mrdev/266d09a5d5b8b7fffe7805b273cb2e52 to your computer and use it in GitHub Desktop.
Github Actions SSH Deploy Workflow
name: Remote ssh command
on:
push:
branches: [ main ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
script: cd ${{ secrets.PROJECT_PATH }} && git pull
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment