From fd30c781b33c94373e7e541ba50f36e99fe49a26 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Fri, 25 Jul 2025 11:20:52 -0400 Subject: [PATCH] #3. --- .gitea/workflows/hugo_site_deployment.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/hugo_site_deployment.yml b/.gitea/workflows/hugo_site_deployment.yml index 2bb1456..148dc06 100644 --- a/.gitea/workflows/hugo_site_deployment.yml +++ b/.gitea/workflows/hugo_site_deployment.yml @@ -69,6 +69,8 @@ jobs: steps: - name: Checkout Code uses: actions/checkout@v4 + with: + fetch-depth: 2 - run: | pwd ls -al @@ -79,12 +81,16 @@ jobs: gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}' notification_title: 'GITEA: Hugo @ Rinoa' notification_message: 'Starting translations...' + - name: get changed files name + id: changed_files + run: | + echo "files=$(git diff --name-only HEAD^ HEAD | grep '\.md$' | tr '\n' ' ')" >> $GITHUB_OUTPUT - name: GPT Translations (es,ko,zh-Hans) uses: 3ru/gpt-translate@v1.2.2 with: token: ${{ secrets.BOT_GITEA_TOKEN }} apikey: ${{ secrets.OPENAI_API_KEY }} - inputFiles: content/en/*.md + inputFiles: ${{ steps.changed_files.outputs.files }} outputFiles: 'content/es/*.md content/ko/*.md content/zh-Hans/*.md' languages: Spanish Korean Chinese - name: Add/Commit README.md