外部FBXのロード #28
Workflow file for this run
This file contains 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: Translate README | |
on: | |
pull_request: | |
branches: | |
- develop | |
paths: | |
- README.md | |
jobs: | |
translate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4.2.2 | |
- name: Set up Python | |
uses: actions/setup-python@v5.3.0 | |
with: | |
python-version: '3.11' | |
- name: Install OpenAI library | |
run: pip install openai | |
- name: Run translation script | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
run: python .github/scripts/translate_readme.py | |
- name: Commit changes | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
# 変更をステージしてコミット | |
git add README_EN.md README_CN.md README_ES.md README_FR.md | |
if git commit -m "Update translations"; then | |
echo "Changes committed successfully." | |
# Pullでリモートの最新の変更を取り込み、リベース | |
if git pull --rebase origin ${{ github.head_ref }}; then | |
echo "Successfully rebased." | |
else | |
echo "Rebase failed. Please review the errors." | |
exit 1 # エラーが発生した場合、処理を中止 | |
fi | |
# スタッシュが必要かを確認 | |
if git stash list | grep -q "stash@{0}"; then | |
# スタッシュが存在する場合はポップする | |
git stash pop | |
fi | |
# 最後にプッシュ | |
git push origin HEAD:${{ github.head_ref }} | |
else | |
echo "No changes to commit" | |
fi |