From ec568fb1e65c4070ccbfc57021617d2cfd63bdea Mon Sep 17 00:00:00 2001 From: Magic <82341152+MagicTheDev@users.noreply.github.com> Date: Sat, 17 Aug 2024 10:55:49 -0500 Subject: [PATCH] initial --- .github/workflows/sync.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 0cb523c..bbbf3d9 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -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 git@github.com: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