Skip to content

chore: Update README.md #6

chore: Update README.md

chore: Update README.md #6

name: GPT Translate per Commit
on:
push:
branches:
- main
jobs:
gpt_translate:
runs-on: ubuntu-latest
steps:
- name: Checkout repository with two latest commits
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: get changed files name
id: changed_files
run: |
echo "files=$(git diff --name-only HEAD^ HEAD | grep '\.md$' | tr '\n' ' ')" >> $GITHUB_OUTPUT
- name: Run GPT Translate
uses: 3ru/gpt-translate@master
with:
# Refer: https://g-t.vercel.app/docs/references/input.en
apikey: ${{ secrets.OPENAI_API_KEY }}
provider: 'openai'
model: 'llama-3.1-sonar-small-128k-chat'
basePath: https://api.perplexity.ai
temperature: 0
inputFiles: ${{ steps.changed_files.outputs.files }}
outputFiles: 'docs/zh/**/*.md'
languages: 'Chinese'