Skip to content

markjivko/push-to-github

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Push to GitHub

GitHub action to push directory to another GitHub repository

Usage

You need to provide the target repository's private key as a secret.

Using GITHUB_SSH_KEY

  • Create an SSH key-pair on your machine
  • Add the public key to your target repository as a deploy key with write access
  • Add the private key to your source repository as a secret (for example MY_GITHUB_PRIVATE_SSH_KEY)
uses: markjivko/push-to-github@main
env:
  GITHUB_SSH_KEY: ${{ secrets.MY_GITHUB_PRIVATE_SSH_KEY }}
with:
  source-directory: "out"
  target-github-username: "my-user"
  target-github-repository: "my-repo"
  target-github-branch: "main"
  commit-email: "[email protected]"
  commit-name: "John Doe"
  commit-message: ${{ github.event.head_commit.message }}