-
Notifications
You must be signed in to change notification settings - Fork 126
50 lines (39 loc) · 1.47 KB
/
update-i18n-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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@0a44ba7841725637a19e28fa30b79a866c81b0a6 # tag: v4.0.4
with:
node-version: 20
- name: Install dependencies
uses: bahmutov/npm-install@dc9579d3dfb9c0e7a1f56c194eefcb8e2c9f0da5 # tag: v1.10.3
- 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 }}