From c1b713a5b2bae2f100e2ed50b16532bd6e52972e Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 28 Mar 2026 10:25:09 +0000 Subject: [PATCH] [feat](trx-rs): add GitHub workflow to sync docs/ to wiki Introduces a GitHub Actions workflow that mirrors the docs/ directory to the repository wiki on every push to main that touches docs/. Also supports manual dispatch via workflow_dispatch. https://claude.ai/code/session_01Hs4BtTczFdXaggpzaHFfen Signed-off-by: Claude --- .github/workflows/wiki.yml | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/wiki.yml diff --git a/.github/workflows/wiki.yml b/.github/workflows/wiki.yml new file mode 100644 index 0000000..1918622 --- /dev/null +++ b/.github/workflows/wiki.yml @@ -0,0 +1,39 @@ +name: Sync docs to Wiki + +on: + push: + branches: [main] + paths: + - 'docs/**' + workflow_dispatch: + +permissions: + contents: write + +jobs: + wiki: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Checkout wiki + uses: actions/checkout@v4 + with: + repository: ${{ github.repository }}.wiki + path: wiki + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Sync docs to wiki + run: | + rsync -av --delete --exclude='.git' docs/ wiki/ + cd wiki + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add -A + if git diff --cached --quiet; then + echo "No wiki changes to commit." + else + git commit -m "Sync docs from ${GITHUB_SHA::8}" + git push + fi