Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Update Translated Docs" | |
on: | |
push: | |
branches: | |
- main | |
- update-docs-job | |
paths: | |
- 'docs/**' | |
jobs: | |
update-docs: | |
name: Build and Push Translated Docs | |
runs-on: ubuntu-latest | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
enable-cache: true | |
- name: Install dependencies | |
run: make sync | |
- name: Build full docs | |
run: make build-full-docs | |
- name: Commit and push changes | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
git add . | |
if [ -n "$(git status --porcelain)" ]; then | |
git commit -m "Update all translated document pages" | |
git push | |
else | |
echo "No changes to commit" | |
fi |