File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ name : " Update Translated Docs"
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ paths :
8+ - ' docs/**'
9+ paths-ignore :
10+ - ' docs/src/content/docs/ja/**'
11+
12+ jobs :
13+ update-docs :
14+ if : " !contains(github.event.head_commit.message, 'Update all translated document pages')"
15+ runs-on : ubuntu-latest
16+ steps :
17+ - name : Checkout repository
18+ uses : actions/checkout@v4
19+ with :
20+ fetch-depth : 0
21+ - name : Install pnpm
22+ uses : pnpm/action-setup@v4
23+ with :
24+ version : 10.13.1
25+ run_install : false
26+ - name : Setup Node.js
27+ uses : actions/setup-node@v4
28+ with :
29+ node-version : 20
30+ cache : ' pnpm'
31+ - name : Install dependencies
32+ run : pnpm install
33+ - name : Translate docs
34+ env :
35+ OPENAI_API_KEY : ${{ secrets.PROD_OPENAI_API_KEY }}
36+ run : pnpm docs:translate
37+ - name : Commit changes
38+ run : |
39+ git config user.name "github-actions[bot]"
40+ git config user.email "github-actions[bot]@users.noreply.github.com"
41+ git add docs/
42+ if [ -n "$(git status --porcelain)" ]; then
43+ git commit -m "Update all translated document pages"
44+ git push
45+ else
46+ echo "No changes to commit"
47+ fi
You can’t perform that action at this time.
0 commit comments