-
Notifications
You must be signed in to change notification settings - Fork 1
25 lines (25 loc) · 1.33 KB
/
pushWeb.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
name: pushWeb
run-name: ${{ github.actor }} pushed a website commit
on: [push, workflow_dispatch]
jobs:
copy-files:
runs-on: ubuntu-latest
steps:
- name: Get repo files
uses: actions/checkout@v3
- name: Update files on remote server
env:
ssh_remote_ip: ${{ secrets.SSH_REMOTE_IP }}
ssh_remote_port: ${{ secrets.SSH_REMOTE_PORT }}
ssh_remote_user: ${{ secrets.SSH_REMOTE_USER }}
SSHPASS: ${{ secrets.SSH_PW }}
run: |
echo "Prepare SSH connection"
mkdir -p ~/.ssh/
touch ~/.ssh/known_hosts
ssh-keyscan -H -p $ssh_remote_port $ssh_remote_ip &> ~/.ssh/known_hosts
echo "Now connecting and transferring"
sshpass -e sftp -P $ssh_remote_port $ssh_remote_user@$ssh_remote_ip:/home/u464711639/domains/thatstel.la/public_html/ <<< $'put /home/runner/work/landing/landing/index.html'
sshpass -e sftp -P $ssh_remote_port $ssh_remote_user@$ssh_remote_ip:/home/u464711639/domains/thatstel.la/public_html/files/hidden/css/ <<< $'put /home/runner/work/landing/landing/landing-styleshit.css'
sshpass -e sftp -P $ssh_remote_port $ssh_remote_user@$ssh_remote_ip:/home/u464711639/domains/thatstel.la/public_html/ <<< $'put -r /home/runner/work/landing/landing/landing-assets/'
echo "Commands finished"