Skip to content

Translate JSON

Translate JSON #2

Workflow file for this run

name: Translate JSON
on:
push:
paths:
- 'page/translations.json'
jobs:
translate:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies
run: npm install openai
- name: Translate JSON
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: node translate.js
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'Automated translation update'
branch: main