Skip to content

Add /tools/discord-export-viewer and remove /others/off-topic-archive #135

Add /tools/discord-export-viewer and remove /others/off-topic-archive

Add /tools/discord-export-viewer and remove /others/off-topic-archive #135

Workflow file for this run

name: sync github wiki
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
sync-wiki:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: checkout repo
uses: actions/checkout@v4
- name: verify wiki source exists
run: |
if [ ! -d wiki ]; then
echo "wiki/ directory not found."
exit 1
fi
- name: clone github wiki
env:
WIKI_PUSH_TOKEN: ${{ secrets.WIKI_PUSH_TOKEN }}
run: |
if [ -z "${WIKI_PUSH_TOKEN}" ]; then
echo "Missing required secret: WIKI_PUSH_TOKEN"
exit 1
fi
git clone "https://x-access-token:${WIKI_PUSH_TOKEN}@github.com/ashprids/fridge.dev.wiki.git" wiki-repo
- name: sync wiki files
run: |
rsync -av --delete --exclude='.git/' wiki/ wiki-repo/
- name: commit and push wiki changes
working-directory: wiki-repo
run: |
if git diff --quiet --exit-code; then
echo "Wiki already up to date."
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add --all
git commit -m "sync wiki from main (${GITHUB_SHA})"
git push origin master