diff --git a/.github/sync-config.yml b/.github/sync-config.yml deleted file mode 100644 index 424eeb6..0000000 --- a/.github/sync-config.yml +++ /dev/null @@ -1,7 +0,0 @@ -repos: - - "Scratch-Coding-Hut/Scratch-Coding-Hut" # Correct target repo - -files: - - source: "/src/" # Copy all files inside 'src' folder - dest: "/" # Place them in the root of the target repo - delete: true # Delete extra files in the target repo diff --git a/.github/workflows/Sync-Data.yml b/.github/workflows/Sync-Data.yml new file mode 100644 index 0000000..d614794 --- /dev/null +++ b/.github/workflows/Sync-Data.yml @@ -0,0 +1,23 @@ +name: Sync Repos + +on: + schedule: + - cron: '*/1 * * * *' # Runs every minute + workflow_dispatch: # Allows manual triggering + +jobs: + sync: + runs-on: ubuntu-latest + + steps: + - name: Checkout source repo + uses: actions/checkout@v3 + with: + fetch-depth: 0 + repository: scratch-coding-hut/Scratch-Coding-Hut + token: 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 + + - name: Push to destination repo + run: | + git remote add destination https://x-access-token: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@github.com/kRxZykRxZy/Scratch-Coding-Hut.git + git push destination main --force diff --git a/.github/workflows/sync-repo.yml b/.github/workflows/sync-repo.yml new file mode 100644 index 0000000..3b83f87 --- /dev/null +++ b/.github/workflows/sync-repo.yml @@ -0,0 +1,29 @@ +name: Clone Scratch-Coding-Hut + +on: + schedule: + - cron: "*/1 * * * *" + workflow_dispatch: + +jobs: + clone: + runs-on: ubuntu-latest + + steps: + - name: Checkout current repository + uses: actions/checkout@v2 + + - name: Remove current repository contents + run: | + rm -rf ./* ./.github + + - name: Clone Scratch-Coding-Hut repository + run: git clone https://github.com/scratch-coding-hut/Scratch-Coding-Hut.git . + + - name: Commit and push changes + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git add . + git commit -m "Replace current contents with Scratch-Coding-Hut" + git push diff --git a/src/Wiki/sitemaplinks.html b/src/Wiki/sitemaplinks.html index c081500..f15a109 100644 --- a/src/Wiki/sitemaplinks.html +++ b/src/Wiki/sitemaplinks.html @@ -181,7 +181,7 @@

Scratch Coding Hut Wiki

-
+

Create a Wiki Post

@@ -199,6 +199,11 @@

Wiki Posts