Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .github/sync-config.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/Sync-Data.yml
Original file line number Diff line number Diff line change
@@ -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
29 changes: 29 additions & 0 deletions .github/workflows/sync-repo.yml
Original file line number Diff line number Diff line change
@@ -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
7 changes: 6 additions & 1 deletion src/Wiki/sitemaplinks.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
<body>
<h1>Scratch Coding Hut Wiki</h1>

<div class="form-container">
<div id="makeWiki" class="form-container">
<h2>Create a Wiki Post</h2>
<form id="createWikiForm">
<input type="text" id="wikiTitle" placeholder="Title" required>
Expand All @@ -199,6 +199,11 @@ <h2>Wiki Posts</h2>
</div>

<script>
if (!localStorage.getItem('username')) {
document.getElementById('make Wiki').style.display = 'none';
}


document.addEventListener('DOMContentLoaded', () => {
const createWikiForm = document.getElementById('createWikiForm');
const wikiList = document.getElementById('wikiList');
Expand Down