Skip to content

Translate Documentation #5

Translate Documentation

Translate Documentation #5

Workflow file for this run

name: Translate Documentation
on:
schedule:
- cron:
'0 20 * * *' # Daily at 20:00 UTC (DeepSeek API off-peak pricing window 16:30-00:30 UTC)
# Pacific Time: 1:00 PM PDT / 12:00 PM PST
# Off-peak window in PT: ~9:30 AM to 5:30 PM PDT / ~8:30 AM to 4:30 PM PST
workflow_dispatch: # Allow manual triggering
inputs:
custom_arguments:
description: 'Custom arguments to pass to the translation package command'
required: false
type: string
# Add permissions needed for creating PRs
permissions:
contents: write
pull-requests: write
jobs:
translate:
runs-on: ubuntu-latest
steps:
# Use the translate-docs-action
- name: Translate documentation
uses: TanStack-dev/translate-docs-action@main
with:
# Required inputs
api_key: ${{ secrets.OPENAI_API_KEY }}
# Optional inputs with their default values shown
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_arguments: ${{ github.event.inputs.custom_arguments }}
# translation_package: '@tanstack-dev/translate-docs'
# base_branch: 'main'
# pr_branch: 'docs/update-translations'
# pr_title: 'Update translations'
# pr_body: 'This PR updates the documentation translations automatically.\n\nGenerated by the translate workflow.'
# commit_message: 'docs: update documentation translations'
# add_paths: 'docs/**'
# enable_formatting: 'true'
# format_command: 'pnpm prettier:write'