I’ve tried multiple to copy my repo file to server on push, im new to the github workflow actions..
But no files are being synced..
Following is my yaml.
name: Deploy to cPanel
on: push: branches: - main
jobs: deploy: runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: List files in GitHub workspace
run: ls -al ${{ github.workspace }}
- name: SSH and execute commands
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.CPANEL_HOST }}
username: ${{ secrets.CPANEL_USERNAME }}
key: ${{ secrets.SSH_CPANEL_KEY }}
passphrase: ${{ secrets.SSH_PASSPHRASE }} # Only include this if your private key is encrypted
port: ${{ secrets.CPANEL_PORT }}
script: |
rsync -avz --delete-after --exclude '.*/' --exclude 'access-logs' --exclude '.cagefs' github_workflow/
Any guidance is appreciated..