Skip to content

kostyaten/ssh-server-deploy

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSH Server Deploy

GitHub

Usage

Simple example using username and password

name: SSH Server Deploy
on: [push]
jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: SSH Server Deploy
        uses: kostya-ten/ssh-server-deploy@v4
        with:
          host: ${{ secrets.SERVER_HOST }}
          port: ${{ secrets.SERVER_PORT }}
          username: ${{ secrets.SERVER_USERNAME }}
          password: ${{ secrets.SERVER_PASSWORD }}
          scp_source: README.md
          scp_target: ~/
          before_script: |
            df -h
          after_script: |
            whoami

Simple example using ssh private key

name: SSH Server Deploy
on: [push]
jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: SSH Server Deploy
        uses: kostya-ten/ssh-server-deploy@v4
        with:
          host: ${{ secrets.SERVER_HOST }}
          port: ${{ secrets.SERVER_PORT }}
          username: ${{ secrets.SERVER_USERNAME }}
          private_key: ${{ secrets.PRIVATE_KEY }}
          scp_source: README.md
          scp_target: ~/
          before_script: |
            df -h
          after_script: |
            whoami