File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on : [push]
4+
5+ jobs :
6+ build :
7+ name : Build and test
8+ runs-on : ubuntu-latest
9+ if : github.actor != 'github-actions[bot]'
10+
11+ env :
12+ CI : true
13+ NEXT_PUBLIC_APP_URL : " https://onruntime.com"
14+
15+ steps :
16+ - name : Checkout repo
17+ uses : actions/checkout@v4
18+ with :
19+ fetch-depth : 2
20+ token : ${{ secrets.GITHUB_TOKEN }}
21+
22+ - name : Install pnpm
23+ uses : pnpm/action-setup@v4
24+
25+ - name : Use Node
26+ uses : actions/setup-node@v4
27+ with :
28+ node-version : " 22.x"
29+ cache : " pnpm"
30+
31+ - name : Install Dependencies
32+ run : pnpm install
33+
34+ - name : Generate translations
35+ env :
36+ OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
37+ run : pnpm --filter @onruntime/web translate
38+
39+ - name : Test
40+ run : pnpm test
41+
42+ - name : Build
43+ run : pnpm build
44+
45+ - name : Commit translations
46+ if : github.ref == 'refs/heads/master'
47+ run : |
48+ git config user.name "github-actions[bot]"
49+ git config user.email "github-actions[bot]@users.noreply.github.com"
50+ git add apps/web/src/locales/ apps/web/src/content/
51+ if ! git diff --staged --quiet; then
52+ FILES_CHANGED=$(git diff --staged --name-only | wc -l | tr -d ' ')
53+ git commit -m "🌐 update ${FILES_CHANGED} translations files"
54+ git push
55+ fi
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments