1

I have a build running on Github. Once the build is done, I want to push the files (DIST directory content) to a folder in my shared hosting.

The steps I followed:

  1. I have the directory setup and there is a live URL for that directory.
  2. In the Cpanel, I have created public and private keys. The key is authorized and converted to the PPK format.
  3. I have the secret keys and data in the Git Hub Settings/Secrets config.
  4. I have a build script and a deploy script. The build is successfully running and complete, but the deploy is failing.

The error is the following:

Run SamKirkland/web-deploy@v1
----------------------------------------------------------------
🚀 Thanks for using web deploy. Let's deploy some stuff!
----------------------------------------------------------------
If you found this project helpful, please support it
by giving it a ⭐ on Github --> https://github.com/SamKirkland/web-deploy
or add a badge 🏷️ to your projects readme --> https://github.com/SamKirkland/web-deploy#badge
----------------------------------------------------------------
HOME /home/runner
GITHUB_WORKSPACE /home/runner/work/MYREPO/MYREPO
[SSH] Creating /home/runner/.ssh/known_hosts file in  /home/runner/work/MYREPO/MYREPO
✅ [SSH] file created.
✅ Ssh key added to `.ssh` dir  /home/runner/.ssh/web_deploy_key
/usr/bin/rsync -e ssh -p 2222 -i /home/runner/.ssh/web_deploy_key -o StrictHostKeyChecking=no --archive --verbose --compress --human-readable --progress --delete-after --exclude=.git* --exclude=.git/ --exclude=README.md --exclude=readme.md --exclude=.gitignore ./ ***@***:***
<Buffer 6b 65 78 5f 65 78 63 68 61 6e 67 65 5f 69 64 65 6e 74 69 66 69 63 61 74 69 6f 6e 3a 20 72 65 61 64 3a 20 43 6f 6e 6e 65 63 74 69 6f 6e 20 72 65 73 65 ... 57 more bytes>
<Buffer 72 73 79 6e 63 3a 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 75 6e 65 78 70 65 63 74 65 64 6c 79 20 63 6c 6f 73 65 64 20 28 30 20 62 79 74 65 73 20 72 65 63 ... 93 more bytes>
kex_exchange_identification: read: Connection reset by peer
Connection reset by *** port 2222
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(231) [sender=3.2.7]
Error: Error: The process '/usr/bin/rsync' failed with exit code 255
✅ Deploy Complete

I have the folliwing deploy code script main.yml:

on: push
name: Publish Website
jobs:
  web-deploy:
    name: 🚀 Deploy Website Every Commit
    runs-on: ubuntu-latest
    steps:
    - name: 🚚 Get Latest Code
      uses: actions/checkout@v3
    
    - name: 📂 Sync Files
      uses: SamKirkland/web-deploy@v1
      with:
        target-server: ${{ secrets.HOST }}
        ssh-port: 2222
        remote-user: ${{ secrets.USERNAME }}
        private-ssh-key: ${{ secrets.PRIVATE_SSH_KEY }}
        destination-path:  ${{ secrets.PATH }}

Does anyone know why I am getting the error?

Also I am using VUE3 and Webpack. The build is generating a huge number of JS files in the Dist > JS folder. I am not sure how to set that up to make it generate one or just a few files.

Thanks

0

Browse other questions tagged or ask your own question.