-
Notifications
You must be signed in to change notification settings - Fork 123
43 lines (35 loc) · 1.12 KB
/
translate.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
name: Translate Docs Weekly Task
on:
schedule:
- cron: "0 8 * * 1" # 8:00 every Monday
workflow_dispatch:
jobs:
build:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
- name: Set Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Yarn install
uses: borales/actions-yarn@v4
with:
cmd: install
- name: Translate Docs
run: |
git config --global user.email "[email protected]"
git config --global user.name "Milvus-doc-bot"
touch .env
echo DEEPL_API_KEY=${{secrets.DEEPL_API_KEY}} >> .env
echo GITHUB_TOKEN=${{secrets.GH_TOKEN}} >> .env
yarn translate
- name: Commit and push
run: |
git add .
git commit -m "Translate docs"
git push -f origin master
continue-on-error: true
- name: Trigger milvus.io
run: |
curl -XPOST -H "Authorization: Bearer ${{secrets.GH_TOKEN}}" https://api.github.com/repos/milvus-io/milvus.io/dispatches -d '{"event_type": "prod-deploy"}'