Sync language packs #105
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 language packs | |
| on: | |
| schedule: | |
| # Runs every 6 hours | |
| - cron: "0 */6 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout site | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: pip install markdown | |
| - name: Fetch and regenerate language pages | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: python3 scripts/build_languages.py | |
| - name: Commit changes if any | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add languages/ | |
| if git diff --cached --quiet; then | |
| echo "No changes to language pages." | |
| else | |
| git commit -m "chore: sync language packs" | |
| git push | |
| fi |