52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
name: Push files over SCP
|
|
|
|
on:
|
|
push:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
download_and_push:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Downloading Files
|
|
run: |
|
|
echo Downloading Files...
|
|
|
|
- name: remote ssh command
|
|
uses: appleboy/ssh-action@v1.0.1
|
|
with:
|
|
host: ${{ secrets.DEST_IP }}
|
|
username: demon
|
|
password : ${{ secrets.PASS }}
|
|
proxy_host: ${{ secrets.IP }}
|
|
proxy_username: root
|
|
proxy_password: ${{ secrets.PASS }}
|
|
script: rm -rf /var/www/venith
|
|
|
|
- name: Push Files via SCP
|
|
uses: appleboy/scp-action@master
|
|
with:
|
|
host: ${{ secrets.DEST_IP }}
|
|
username: demon
|
|
password : ${{ secrets.PASS }}
|
|
proxy_host: ${{ secrets.IP }}
|
|
proxy_username: root
|
|
proxy_password: ${{ secrets.PASS }}
|
|
source: "/home/runner/work/VENITH.NET/VENITH.NET/"
|
|
target: "/var/www/venith/"
|
|
|
|
- name: remote ssh command
|
|
uses: appleboy/ssh-action@v1.0.1
|
|
with:
|
|
host: ${{ secrets.DEST_IP }}
|
|
username: demon
|
|
password : ${{ secrets.PASS }}
|
|
proxy_host: ${{ secrets.IP }}
|
|
proxy_username: root
|
|
proxy_password: ${{ secrets.PASS }}
|
|
script: mv /var/www/venith/github/workspace/* /var/www/venith/ -f
|
|
|