Update from private repo #7
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: Update from private repo | |
on: [workflow_dispatch] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout current | |
uses: actions/checkout@v4 | |
with: | |
path: current | |
- name: Checkout private | |
uses: actions/checkout@v4 | |
with: | |
repository: wr-porini/private-repo-test | |
path: private | |
token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains your PAT | |
- name: Copy files | |
run: | | |
rsync -av --exclude='.git/' --exclude='.github/' --delete private/ current | |
- name: Push files | |
run: | | |
cd current | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add . | |
git commit -m "generated" | |
git push |