Skip to content

Merge pull request #523 from subspace/farming-cluster #1119

Merge pull request #523 from subspace/farming-cluster

Merge pull request #523 from subspace/farming-cluster #1119

Workflow file for this run

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@v4
# Setup Node.js environment
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
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 --frozen-lockfile
# 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