yaml update3

This commit is contained in:
Hamidreza 2025-05-02 21:51:03 +03:30
parent a7e51a91aa
commit 86367c7e2c
1 changed files with 10 additions and 5 deletions

View File

@ -1,4 +1,3 @@
---
name: Sync-Wiki name: Sync-Wiki
on: on:
@ -6,10 +5,10 @@ on:
branches: branches:
- main - main
paths: paths:
- '**/*.md' - "**/*.md"
- '.github/workflows/sync-wiki.yml' - ".github/workflows/sync-wiki.yml"
- '.github/workflows/markdownList.yml' - ".github/workflows/markdownList.yml"
- '.github/scripts/sync-wiki.py' - ".github/scripts/sync-wiki.py"
workflow_dispatch: workflow_dispatch:
jobs: jobs:
@ -20,12 +19,14 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
path: repo path: repo
- name: Checkout Wiki - name: Checkout Wiki
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
repository: ${{ github.repository }}.wiki repository: ${{ github.repository }}.wiki
path: wiki path: wiki
continue-on-error: true continue-on-error: true
- name: Create Wiki Directory if Not Exists - name: Create Wiki Directory if Not Exists
run: | run: |
if [ ! -d "wiki" ]; then if [ ! -d "wiki" ]; then
@ -36,17 +37,21 @@ jobs:
git config user.email "${{ github.actor }}@users.noreply.github.com" git config user.email "${{ github.actor }}@users.noreply.github.com"
git remote add origin "https://github.com/${{ github.repository }}.wiki.git" git remote add origin "https://github.com/${{ github.repository }}.wiki.git"
fi fi
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v4 uses: actions/setup-python@v4
with: with:
python-version: '3.10' python-version: '3.10'
- name: Install dependencies - name: Install dependencies
run: pip install pyyaml run: pip install pyyaml
- name: Sync markdown files to Wiki - name: Sync markdown files to Wiki
run: | run: |
python $GITHUB_WORKSPACE/repo/.github/scripts/sync-wiki.py python $GITHUB_WORKSPACE/repo/.github/scripts/sync-wiki.py
env: env:
GITHUB_REPOSITORY: ${{ github.repository }} GITHUB_REPOSITORY: ${{ github.repository }}
- name: Push changes to wiki - name: Push changes to wiki
run: | run: |
cd wiki cd wiki