Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
MagicTheDev committed Aug 17, 2024
1 parent 8379453 commit ec568fb
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,22 @@ jobs:

steps:
- name: Checkout the private repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT_TOKEN }}

- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com >> ~/.ssh/known_hosts
- name: Checkout the Public Repo
uses: actions/checkout@v3
with:
repository: ClashKingInc/ClashKingAssets
token: ${{ secrets.PAT_TOKEN }}
path: public_repo

- name: Sync to Public Repo
run: |
git config --global user.name "MagicTheDev"
git remote add public [email protected]:ClashKingInc/ClashKingAssets.git
cd public_repo
cp -R ../. .
git add .
git commit -m "Sync to public repo" || echo "No changes to commit"
git push --force public main
git push --force

0 comments on commit ec568fb

Please sign in to comment.