Skip to content

Localization Update #1119

Localization Update

Localization Update #1119

Workflow file for this run

on:
workflow_dispatch:
schedule:
- cron: "30 0 * * 1-6"
name: Localization Update
jobs:
update:
name: Update
runs-on: ubuntu-latest
steps:
- name: Checkout ScratchAddons/website-i18n
uses: actions/checkout@v4
with:
path: repo
fetch-depth: 20
- name: Checkout ScratchAddons/website-v2-script
uses: actions/checkout@v4
with:
repository: ScratchAddons/website-v2-script
path: script
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Cache Node.js dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
- name: Execute script
id: script
run: |
echo Running...
cd repo
bash ../script/sh/i18n-update-i18n.sh
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}
- name: Upload whole repo on manual (to check i18n)
if: github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v4
with:
name: public
path: |
./repo
!./repo/.git
- name: Generate token
if: steps.script.outputs.has_new_commit == 'true'
uses: tibdex/github-app-token@v2
id: generate-token
with:
app_id: ${{ secrets.BOT_APP_ID }}
private_key: ${{ secrets.BOT_PRIVATE_KEY }}
- name: Invoke workflow
if: steps.script.outputs.has_new_commit == 'true'
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Site Deployment
repo: ScratchAddons/website-v2
token: ${{ steps.generate-token.outputs.token }}
inputs: '{ "upload_repo": "false" }'