OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

GitHub Actions - Successful Workflow Run, But No Files Copied to Server

  • Thread starter Thread starter suliman babar_legion-lad
  • Start date Start date
S

suliman babar_legion-lad

Guest
I've tried multiple times to copy my repo files to server on push, im new to the github workflow actions.. No files are being synced..

Following is my yaml.

Code:
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..
<p>I've tried multiple times to copy my repo files to server on push, im new to the github workflow actions..
No files are being synced..</p>
<p>Following is my yaml.</p>
<pre><code>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/
</code></pre>
<p>Any guidance is appreciated..</p>
Continue reading...
 

Latest posts

Top