-
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (47 loc) · 1.43 KB
/
ci.yml
File metadata and controls
59 lines (47 loc) · 1.43 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: CI
on: [push]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: false
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
if: github.actor != 'github-actions[bot]'
env:
CI: true
NEXT_PUBLIC_APP_URL: "https://onruntime.com"
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 2
ssh-key: ${{ secrets.DEPLOY_KEY }}
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node
uses: actions/setup-node@v4
with:
node-version: "22.x"
cache: "pnpm"
- name: Install Dependencies
run: pnpm install
- name: Generate translations
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: pnpm --filter @onruntime/web translate
- name: Commit translations
if: github.ref == 'refs/heads/master'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add apps/web/src/locales/ apps/web/src/content/
if ! git diff --staged --quiet; then
FILES_CHANGED=$(git diff --staged --name-only | wc -l | tr -d ' ')
git commit -m "🌐 update ${FILES_CHANGED} translations files"
git push
fi
- name: Test
run: pnpm test
- name: Build
run: pnpm build