Sync Repo #3
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: Sync to Public Repo | |
on: | |
workflow_dispatch: # Allows the action to be triggered manually | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the private repository | |
uses: actions/checkout@v2 | |
- 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: Sync to Public Repo | |
run: | | |
git config --global user.name "MagicTheDev" | |
git remote add public [email protected]:ClashKingInc/ClashKingAssets.git | |
git add . | |
git commit -m "Sync to public repo" || echo "No changes to commit" | |
git push --force public main |