Repository navigation
Compile knowledge: PDLL, DeclarativeRewrites, Linalg rationale #5
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: Auto-translate to Chinese | |
| on: | |
| push: | |
| branches: [main] | |
| paths: ['site/data.js'] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| translate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Run translation | |
| run: node scripts/translate.js | |
| - name: Commit and push | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add site/data-cn.js scripts/.translate-hashes.json | |
| if git diff --cached --quiet; then | |
| echo "No translation changes to commit." | |
| else | |
| git commit -m "chore: auto-translate data-cn.js" | |
| git push | |
| fi |