Skip to content

Update i18n deploy #23125

Update i18n deploy

Update i18n deploy #23125

name: 'Update i18n deploy'
on:
schedule:
- cron: '0 0,12 * * *'
workflow_dispatch:
permissions:
contents: read
jobs:
deploy:
name: 'Build and deploy localized site'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag: v4.2.2
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # tag: v4.1.0
with:
node-version: 20
- name: Install dependencies
uses: bahmutov/npm-install@438a933ce1059e4e2b39e3d2a42c5067070dd444 # tag: v1.10.4
- name: Download crowdin translation
run: yarn i18n:download
env:
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
- name: Update Crowdin glossary
run: yarn i18n:glossary
env:
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
# TODO: figure out if this can be re-enabled?
# - name: Download cache
# run: ./scripts/bin/azcopy copy "https://electronwebsite.blob.core.windows.net/%24web/*?$SAS" "./build" --recursive
# env:
# SAS: ${{ secrets.SAS }}
- name: Add Docusaurus problem matcher
run: echo "::add-matcher::.github/problem-matchers/docusaurus.json"
- name: Build
run: yarn i18n:build
- name: Deploy
run: ./scripts/bin/azcopy copy "./build/*" "https://electronwebsite.blob.core.windows.net/%24web?$SAS" --recursive
env:
SAS: ${{ secrets.SAS }}