Skip to content

Commit 9e51aee

Browse files
committed
Add a new GH Actions job to automatically update translated document pages
1 parent aa197e1 commit 9e51aee

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/update-docs.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: "Update Translated Docs"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'docs/**'
9+
10+
jobs:
11+
update-docs:
12+
name: Build and Push Translated Docs
13+
runs-on: ubuntu-latest
14+
env:
15+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Build full docs
23+
run: make build-full-docs
24+
25+
- name: Commit and push changes
26+
run: |
27+
git config user.name "github-actions[bot]"
28+
git config user.email "github-actions[bot]@users.noreply.github.com"
29+
git add .
30+
if [ -n "$(git status --porcelain)" ]; then
31+
git commit -m "Update all translated document pages"
32+
git push
33+
else
34+
echo "No changes to commit"
35+
fi

0 commit comments

Comments
 (0)