Skip to content

Commit d7e0d9b

Browse files
authored
fix(i18n): update translations action to run once per week on sunday (#2816)
1 parent 51477c1 commit d7e0d9b

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

.github/workflows/i18n.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
name: 'Auto-translate Documentation'
22

33
on:
4-
push:
5-
branches: [ staging ]
6-
paths:
7-
- 'apps/docs/content/docs/en/**'
8-
- 'apps/docs/i18n.json'
4+
schedule:
5+
# Run every Sunday at midnight UTC
6+
- cron: '0 0 * * 0'
7+
workflow_dispatch: # Allow manual triggers
98

109
permissions:
1110
contents: write
@@ -20,6 +19,7 @@ jobs:
2019
- name: Checkout repository
2120
uses: actions/checkout@v4
2221
with:
22+
ref: staging
2323
token: ${{ secrets.GH_PAT }}
2424
fetch-depth: 0
2525

@@ -68,12 +68,11 @@ jobs:
6868
title: "feat(i18n): update translations"
6969
body: |
7070
## Summary
71-
Automated translation updates triggered by changes to documentation.
72-
73-
This PR was automatically created after content changes were made, updating translations for all supported languages using Lingo.dev AI translation engine.
74-
75-
**Original trigger**: ${{ github.event.head_commit.message }}
76-
**Commit**: ${{ github.sha }}
71+
Automated weekly translation updates for documentation.
72+
73+
This PR was automatically created by the scheduled weekly i18n workflow, updating translations for all supported languages using Lingo.dev AI translation engine.
74+
75+
**Triggered**: Weekly scheduled run
7776
**Workflow**: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
7877
7978
## Type of Change
@@ -107,7 +106,7 @@ jobs:
107106
## Screenshots/Videos
108107
<!-- Translation changes are text-based - no visual changes expected -->
109108
<!-- Reviewers should check the documentation site renders correctly for all languages -->
110-
branch: auto-translate/staging-merge-${{ github.run_id }}
109+
branch: auto-translate/weekly-${{ github.run_id }}
111110
base: staging
112111
labels: |
113112
i18n
@@ -145,6 +144,8 @@ jobs:
145144
bun install --frozen-lockfile
146145
147146
- name: Build documentation to verify translations
147+
env:
148+
DATABASE_URL: postgresql://dummy:dummy@localhost:5432/dummy
148149
run: |
149150
cd apps/docs
150151
bun run build
@@ -153,7 +154,7 @@ jobs:
153154
run: |
154155
cd apps/docs
155156
echo "## Translation Status Report" >> $GITHUB_STEP_SUMMARY
156-
echo "**Triggered by merge to staging branch**" >> $GITHUB_STEP_SUMMARY
157+
echo "**Weekly scheduled translation run**" >> $GITHUB_STEP_SUMMARY
157158
echo "" >> $GITHUB_STEP_SUMMARY
158159
159160
en_count=$(find content/docs/en -name "*.mdx" | wc -l)

0 commit comments

Comments
 (0)