Update i18n deploy #23721
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: 'Update i18n deploy' | |
on: | |
schedule: | |
# twice a day at 8:00 and 16:00 UTC | |
- cron: '0 8,16 * * *' | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
deploy: | |
name: 'Build and deploy localized site' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag: v5.0.0 | |
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # tag: v4.4.0 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --immutable | |
- 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 }} | |
- name: Add Docusaurus problem matcher | |
run: echo "::add-matcher::.github/problem-matchers/docusaurus.json" | |
- name: Build | |
run: yarn i18n:build | |
- name: Sync build directory to Azure Blob Storage | |
# The i18n build produces the default locale anyways so we can just sync the whole build directory | |
run: cd build && ../scripts/bin/azcopy sync "./" "https://electronwebsite.blob.core.windows.net/%24web?$SAS" --delete-destination=true --compare-hash=MD5 | |
env: | |
SAS: ${{ secrets.SAS }} | |
- name: Upload azcopy debug logs | |
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 #v4.6.2 | |
with: | |
name: debug-log | |
path: /home/runner/.azcopy/*.log | |
include-hidden-files: true | |
retention-days: 3 |