-
Notifications
You must be signed in to change notification settings - Fork 12
36 lines (32 loc) · 1.03 KB
/
Copy pathsync-language-docs.yml
File metadata and controls
36 lines (32 loc) · 1.03 KB
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
name: Sync language docs
on:
schedule:
- cron: "17 6 * * *"
workflow_dispatch:
permissions:
contents: write
pull-requests: write
concurrency:
group: sync-language-docs
cancel-in-progress: false
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 22
- name: Regenerate language docs from /v3/languages
env:
DEEPL_API_KEY: ${{ secrets.DEEPL_API_KEY }}
# stderr goes to a file first (a `>(tee ...)` child is not awaited, the
# next step could read a partial file), then back into the step log
run: |
node scripts/update-language-docs.mjs "$DEEPL_API_KEY" 2> "$RUNNER_TEMP/warnings.txt" || { cat "$RUNNER_TEMP/warnings.txt" >&2; exit 1; }
cat "$RUNNER_TEMP/warnings.txt" >&2
- name: Open or update the sync PR
env:
GH_TOKEN: ${{ github.token }}
WARNINGS_FILE: ${{ runner.temp }}/warnings.txt
run: scripts/open-sync-pr.sh