Skip to content
/ sync Public

GitHub Action to sync a directory to another repository via SSH πŸ”„

License

Notifications You must be signed in to change notification settings

fabraix/sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Sync to Repository

A GitHub Action to sync a directory to another repository using SSH deploy keys.

Usage

- uses: fabraix/sync@v1.0.0
  with:
    source-directory: ./dist
    destination-repository: your-org/target-repo
    target-branch: master
    user-email: bot@yourcompany.com
    user-name: Sync Bot
  env:
    SSH_DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}

Inputs

Input Required Default Description
source-directory βœ… - Source directory to sync
destination-repository βœ… - Destination repository (e.g., org/repo)
target-branch ❌ master Target branch in destination
target-directory ❌ '' Target directory (empty for root)
commit-message ❌ Sync from ORIGIN_COMMIT Commit message
user-email βœ… - Git user email
user-name βœ… - Git user name

Secrets

Secret Required Description
SSH_DEPLOY_KEY βœ… SSH private key with write access to destination repo

Setup

  1. Generate an SSH key pair:

    ssh-keygen -t ed25519 -C "sync-bot" -f sync_key -N ""
  2. Add sync_key.pub as a Deploy Key (with write access) on the destination repository

  3. Add sync_key (private key) as a Secret named DEPLOY_KEY on the source repository

License

MIT

About

GitHub Action to sync a directory to another repository via SSH πŸ”„

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published