From 343ac1fc048fe324640c2fe0085357b0314ebcb1 Mon Sep 17 00:00:00 2001 From: Hamidreza Date: Fri, 2 May 2025 21:27:23 +0330 Subject: [PATCH] yaml update --- .github/workflows/sync-wiki.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/sync-wiki.yml b/.github/workflows/sync-wiki.yml index 8b458e37..5ebe183e 100644 --- a/.github/workflows/sync-wiki.yml +++ b/.github/workflows/sync-wiki.yml @@ -1,6 +1,7 @@ +--- name: Sync Wiki -on: +true: push: branches: - main @@ -19,31 +20,27 @@ jobs: uses: actions/checkout@v3 with: path: repo - - name: Checkout Wiki uses: actions/checkout@v3 with: repository: ${{ github.repository }}.wiki path: wiki - - name: Set up Python uses: actions/setup-python@v4 with: python-version: '3.10' - - name: Install dependencies run: pip install pyyaml - - name: Sync markdown files to Wiki run: | python $GITHUB_WORKSPACE/repo/.github/scripts/sync-wiki.py env: GITHUB_REPOSITORY: ${{ github.repository }} - - name: Push changes to wiki run: | cd wiki git config user.name "${{ github.actor }}" git config user.email "${{ github.actor }}@users.noreply.github.com" git add . - git diff --quiet && git diff --staged --quiet || (git commit -m "Auto sync wiki from main repository" && git push) + git diff --quiet && git diff --staged --quiet || \ + (git commit -m "Auto sync wiki from main repository" && git push)