Merge pull request #933 from autonomys/version-update-jan-15 #2093
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
| on: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build-and-deploy: | |
| name: Build, Sync Localization, and Deploy Website | |
| runs-on: ubuntu-latest | |
| env: | |
| CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| # Checkout the repository | |
| - uses: actions/checkout@v6 | |
| # Setup Node.js environment | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22.14.0' | |
| cache: 'yarn' | |
| cache-dependency-path: '**/yarn.lock' | |
| # Cache Node.js modules | |
| - name: Cache Node.js modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| **/node_modules | |
| **/yarn.lock | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| # Install dependencies | |
| - name: Install dependencies | |
| run: yarn install | |
| # Build Translation Leaderboard | |
| - name: Build leaderboard | |
| run: yarn run generate-leaderboard | |
| # Sync Localization Files | |
| - name: Sync localization files | |
| run: yarn crowdin:sync | |
| # Build website | |
| - name: Build website | |
| run: yarn build | |
| # Deploy to GitHub Pages | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./build | |
| user_name: github-actions[bot] | |
| user_email: 41898282+github-actions[bot]@users.noreply.github.com |