diff --git a/.github/workflows/sync-wiki.yml b/.github/workflows/sync-wiki.yml new file mode 100644 index 0000000..7b4fed5 --- /dev/null +++ b/.github/workflows/sync-wiki.yml @@ -0,0 +1,34 @@ +name: Sync wiki submodule + +on: + gollum: + +jobs: + sync: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + with: + submodules: true + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Update docs submodule to latest wiki + run: | + cd docs + git fetch origin + git checkout origin/master + cd .. + + - name: Commit and push if changed + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add docs + if git diff --cached --quiet; then + echo "No submodule changes to commit" + else + git commit -m "[chore](trx-rs): sync docs submodule with wiki" + git push + fi