Repository navigation
Sync Markdown #62
This file contains hidden or 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 Markdown | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| # 20:20 MSK (UTC+3) -> 17:20 UTC | |
| - cron: '20 17 * * *' | |
| permissions: | |
| contents: write | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install --no-progress | |
| - name: Run tests | |
| run: bun test | |
| - name: Run sync | |
| run: bun run sync:docs | |
| - name: Commit changes | |
| run: | | |
| if [[ -n "$(git status --porcelain)" ]]; then | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add -A | |
| git commit -m "chore(docs): sync markdown (bun)" | |
| git push | |
| else | |
| echo "No changes to commit." | |
| fi |