Giter VIP home page Giter VIP logo

push-to-another-repo-with-rsync's Introduction

push-to-another-repo-with-rsync

This is a fork of cpina's GitHub action that adds the rsync parameter. This lets the user specify what they want copied over and what files to ignore vs. copying the entire directory over and wiping the destination. "Rsync is a ... file copying tool".

Rsync

One can learn and test Rsync commands easier with RsyncOSX by Thomas Evensen. You can duplicate a similar directory structure as your source/destination repos, add some text files, then test your commands until it does what you want to do before adding the rsync command to the GitHub workflow file.

Example

  • The only real difference here in terms of the workflow file is the additional rsync parameter where you can supply an rsync command. The rsync parameter is optional (but also the only reason you would be using this action anyways).
name: DEPLOY

on:
  push:
    branches:
    - main

jobs:
  build:
    runs-on: ubuntu-latest
    container: ubuntu
    steps:
      - uses: actions/checkout@v3
      - name: Pushes to another repository
        id: push_directory
        uses: 6notes/push-to-another-repo-with-rsync@main
        env:
          SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
        with:
          source-directory: 'EXAMPLE/SRC/DIRECTORY'
          destination-github-username: 'USERNAME'
          destination-repository-name: 'REPO_NAME'
          user-email: [email protected]
          target-branch: main
          rsync: 'rsync --archive --verbose --delete --exclude=.git* --exclude=package*.json --exclude=node_modules --exclude=.next --exclude=README.md --stats'

Documentation for the unchanged parts of this GitHub Action

See the extensive documentation in https://cpina.github.io/push-to-another-repository-docs/ (includes examples, FAQ, troubleshooting, etc.).

GitHub repository of the documentation: https://github.com/cpina/push-to-another-repository-docs

push-to-another-repo-with-rsync's People

Contributors

cpina avatar 6notes avatar eliminater74 avatar sta-szek avatar xenonmolecule avatar smellman avatar eibanez avatar honqii avatar jamesmco avatar rottencandy avatar nedbat avatar oshdev avatar tomasvotruba avatar

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.