2019-09-29 10:45:29 +08:00
|
|
|
name: remote ssh command
|
2019-09-29 10:43:33 +08:00
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2019-09-29 10:52:20 +08:00
|
|
|
- name: executing remote ssh commands using password
|
2019-09-29 10:46:23 +08:00
|
|
|
uses: appleboy/ssh-action@master
|
2019-09-29 10:43:33 +08:00
|
|
|
with:
|
|
|
|
host: ${{ secrets.HOST }}
|
|
|
|
username: ${{ secrets.USERNAME }}
|
|
|
|
password: ${{ secrets.PASSWORD }}
|
|
|
|
port: ${{ secrets.PORT }}
|
|
|
|
script: whoami
|
2019-09-29 10:52:20 +08:00
|
|
|
|
|
|
|
- name: executing remote ssh commands using ssh key
|
|
|
|
uses: appleboy/ssh-action@master
|
|
|
|
with:
|
|
|
|
host: ${{ secrets.HOST }}
|
|
|
|
username: ${{ secrets.USERNAME }}
|
|
|
|
key: ${{ secrets.KEY }}
|
|
|
|
port: ${{ secrets.PORT }}
|
|
|
|
script: whoami
|
2019-09-29 10:53:17 +08:00
|
|
|
|
|
|
|
- name: multiple command
|
|
|
|
uses: appleboy/ssh-action@master
|
|
|
|
with:
|
|
|
|
host: ${{ secrets.HOST }}
|
|
|
|
username: ${{ secrets.USERNAME }}
|
|
|
|
key: ${{ secrets.KEY }}
|
|
|
|
port: ${{ secrets.PORT }}
|
|
|
|
script: >
|
|
|
|
whoami
|
|
|
|
ls -al
|