Skip to content

Sync language packs #105

Sync language packs

Sync language packs #105

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