Skip to content

Commit a60f8d7

Browse files
committed
👷 merge checks and translations workflows into unified ci
1 parent b305baa commit a60f8d7

3 files changed

Lines changed: 55 additions & 73 deletions

File tree

.github/workflows/checks.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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

.github/workflows/translations.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)