mirror of
https://github.com/appleboy/ssh-action.git
synced 2024-11-23 14:36:10 +08:00
26 lines
662 B
YAML
26 lines
662 B
YAML
name: remote ssh command
|
|
on: [push]
|
|
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: whoami
|
|
|
|
- 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
|