Action to commit a file/directory to another repo using a deploy key.
- Create an SSH key pair to use for the commits
- Add the public key to your destination repo as a deploy key with push access
- Add the private key to your source repo as a secret
uses: leigholiver/commit-with-deploy-key@v1.0.0
with:
source: build_output
destination_folder: dist
destination_repo: leigholiver/commit-with-deploy-key
deploy_key: ${{ secrets.DEPLOY_KEY }}
Required The file/directory to commit
Required Private SSH key to use for the commit. The public key must be added to the destination repostitory as a deploy key, with push access
Required Git repository to push changes to
Directory in the destination repo to push changes to (default .
)
Branch in destination repo to push changes to (default main
)
Delete destination directory contents before copy? (default false
)
Github user to use for the commit (default: ${{ github.actor }}
)
Commit message (default <action name> from <commit hash>
)
SHA hash of the generated commit