Deploy dev branch to other repo for pages #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Push Branch to Another Repo | |
on: | |
push: | |
branches: | |
- develop # You can modify this to the branch you want to trigger the action | |
jobs: | |
push-to-repo: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the source repository | |
uses: actions/checkout@v2 | |
- name: Add the destination repository | |
run: | | |
git remote add target https://github.com/${{ secrets.DEST_REPO_OWNER }}/${{ secrets.DEST_REPO_NAME }}.git | |
git fetch target | |
- name: Push branch to the destination repository | |
run: | | |
git push target develop | |