ThatStella7922 pushed a website commit #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |