Sync Global Documentation #408
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Sync Global Documentation' | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '43 21 * * *' # 05:43 AM in Asia/Shanghai (UTC+8) | |
jobs: | |
sync: | |
name: 'Sync' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Sync submodule | |
run: | | |
git submodule update --remote | |
COMMIT_ID=$(git submodule status global | cut -c2-8) | |
git config --local user.name "GitHub Actions" | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git commit -am "Sync from mirrorz-org/mirrorz-docs@${COMMIT_ID::7}" && git push || echo "No changes to commit" |