I have a project that is successfully built but i cannot get github action to rsync to the droplet web folder. I have entered the private key (with the begin and end comment that surround the hash of the private key), i have enabled with ufw the SSH at port 22, somehow i get this error message: Run rsync -avz ./ @:/var/www/html
rsync -avz ./ ***@***:/var/www/html
shell: /usr/bin/bash -e {0}
Host key verification failed.
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: Process completed with exit code 255.
Here is the github action: name: Build and Deploy
on: push: branches: [ main ] workflow_dispatch:
jobs: build: runs-on: ubuntu-latest
env:
NODE_ENV: production
COMPOSER_NO_DEV: 1
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node packages
run: npm install
- name: Build assets
run: npm run build
- name: Setup PHP
uses: "shivammathur/setup-php@v2"
with:
php-version: 8.3
- name: Install Composer packages
uses: ramsey/composer-install@v3
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: AuthenticatorProWebsite
path: |
application
vendor
public
deploy: runs-on: ubuntu-latest needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: AuthenticatorProWebsite
- name: Prepare environment file
run: |
printf %s "${{ secrets.ENV_FILE }}" > .env
- name: Deploy with rsync
run: rsync -avz ./ ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}:/var/www/html
thank you in advance for your help
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.