Giter VIP home page Giter VIP logo

rsync-deploy's Introduction

rsync-deploy

Deploy to a remote server using rsync.

example usage to sync everything in the workspace folder:

- name: deploy to server
        uses: AEnterprise/[email protected]
        env:
          DEPLOY_KEY: ${{ secrets.SERVER_SSH_KEY }}
          ARGS: "-e -c -r --delete"
          SERVER_PORT: ${{ secrets.SERVER_PORT }}
          FOLDER: "./"
          SERVER_IP: ${{ secrets.SERVER_IP }}
          USERNAME: ${{ secrets.USERNAME }}
          SERVER_DESTINATION: ${{ secrets.SERVER_DESTINATION }}

If you only want to sync a specific subfolder you can put that folder in the folder env var instead

rsync-deploy's People

Contributors

aenterprise avatar carnia avatar funwhilelost avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rsync-deploy's Issues

bash: rsync: command not found

the Github Actions log shows that:

Warning: Permanently added '***' (ECDSA) to the list of known hosts.
bash: rsync: command not found
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: remote command not found (code 127) at io.c(235) [sender=3.1.2]

100 error when using in pipelines.

I can't deploy sites using this repo at the moment as they are failing.

Looks like it might be a problem with debian:

 Ign:1 http://deb.debian.org/debian stretch InRelease
  Get:2 http://deb.debian.org/debian stretch-updates InRelease [93.6 kB]
  Ign:3 http://security.debian.org/debian-security stretch/updates InRelease
  Get:4 http://deb.debian.org/debian stretch Release [118 kB]
  Err:5 http://security.debian.org/debian-security stretch/updates Release
    404  Not Found [IP: 151.101.194.132 80]
  Get:6 http://deb.debian.org/debian stretch Release.gpg [3177 B]
  Get:7 http://deb.debian.org/debian stretch/main amd64 Packages [7080 kB]
  Reading package lists...
  E: The repository 'http://security.debian.org/debian-security stretch/updates Release' does not have a Release file.
  The command '/bin/sh -c apt update' returned a non-zero code: 100

rsync: link_stat "/github/workspace/***@" failed: No such file or directory (2)

Hello.
I have a problem:

rsync: link_stat "/github/workspace/***@" failed: No such file or directory (2)
***
***
***
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]

And my config file is:

- name: Deploy to Server
  uses: AEnterprise/[email protected]
  env:
    DEPLOY_KEY: ${{ secrets.CREATIVE_KEY }} 
    ARGS: -avz --delete --exclude='*.pyc'
    SERVER_PORT: "22"
    FOLDER: ./
    SERVER_IP: ${{ secrets.CREATIVE_HOST }}
    USERNAME: ${{ secrets.CREATIVE_USERNAME }}
    SERVER_DESTINATION: /home/***/***/

Although the files will be synced to the server, Github Actions will report an error. Thank you for pay attention to my question!

Multiple deployment servers

Hello

It would be nice to be able to deploy to multiple servers in a single workflow. Currently it throws an error that the direct currently exists when attempting to add it

mkdir: cannot create directory '/github/home/.ssh': File exists

Without testing, this should be possible by adding a flag -p to the mkdir line to only create the directory if it does not exist

ERROR: failed to solve: process "/bin/sh -c apt update" did not complete successfully: exit code: 100 Error: Docker build failed with exit code 1

system: Ubuntu 22.04.1 LTS \n \l
Linux hecs-328487 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

image

ERROR: failed to solve: process "/bin/sh -c apt update" did not complete successfully: exit code: 100
Error: Docker build failed with exit code 1

when i want to deploy ,i get the error form consle , how can i solve this. problem ,thanks

rsync error: protocol incompatibility (code 2) at compat.c(178) [sender=3.1.2]

When I am using this lib, shows error:


Run AEnterprise/[email protected]
/usr/bin/docker run --name a33c1704d039589ff415da99c1705badc1daa_9f851c --label 8a33c1 --workdir /github/workspace --rm -e JAVA_HOME_11.0.11_x64 -e JAVA_HOME -e JAVA_HOME_11_0_11_X64 -e DEPLOY_KEY -e ARGS -e SERVER_PORT -e FOLDER -e SERVER_IP -e USERNAME -e SERVER_DESTINATION -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true --network github_network_16a382ba1ba04fd8b20893774e9e6acd -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/retire/retire":"/github/workspace" 8a33c1:704d039589ff415da99c1705badc1daa
Warning: Permanently added '***' (ECDSA) to the list of known hosts.
protocol version mismatch -- is your shell clean?
(see the rsync man page for an explanation)
rsync error: protocol incompatibility (code 2) at compat.c(178) [sender=3.1.2]

I did not known it is a lib problem.

Error: Unable to resolve action `AEnterprise/[email protected]`, unable to find version `v1.0.1`

Error: Unable to resolve action AEnterprise/[email protected], unable to find version v1.0.1

when I using it in GitHub Actions, show this error:

Current runner version: '2.278.0'
Operating System
Virtual Environment
GITHUB_TOKEN Permissions
Prepare workflow directory
Prepare all required actions
Getting action download info
Failed to resolve action download info. Error: Unable to resolve action `AEnterprise/[email protected]`, unable to find version `v1.0.1`
Retrying in 25.592 seconds
Failed to resolve action download info. Error: Unable to resolve action `AEnterprise/[email protected]`, unable to find version `v1.0.1`
Retrying in 27.781 seconds
Error: Unable to resolve action `AEnterprise/[email protected]`, unable to find version `v1.0.1`


this is the script I am using:


    - name: Copy jar to Server
      uses: AEnterprise/[email protected]
      env:
        # use pre-configured secret (the private key)
        DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
        ARGS: -avz --delete
        SERVER_PORT: "22"
        # folder to push (./ is the root of current repo)
        FOLDER: ./dolphin-post/dolphin-post-service/build/libs
        SERVER_IP: ${{ secrets.BINGQIAN_HOST }}
        USERNAME: ${{ secrets.BINGQIAN_USER }}
        SERVER_DESTINATION: /opt/apps/dolphin-post


"/github/workspace/build" failed: No such file or directory

rsync: link_stat "/github/workspace/build" failed: No such file or directory (2)
sending incremental file list
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]

sent 18 bytes received 12 bytes 6.67 bytes/sec
total size is 0 speedup is 0.00
##[error]Docker run failed with exit code 23

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.