diff --git a/.github/workflows/translate_af.yml b/.github/workflows/translate_af.yml index 82c9fee282..cf86b7d32b 100644 --- a/.github/workflows/translate_af.yml +++ b/.github/workflows/translate_af.yml @@ -91,14 +91,36 @@ jobs: echo "Translating $(cat /tmp/file_paths.txt)" python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3 - # Build the mdBook - - name: Build mdBook - run: mdbook build - # Push changes to the repository - name: Commit and push changes run: | git checkout "$BRANCH" git add -A git commit -m "Translated $BRANCH files" || true - git push --set-upstream origin "$BRANCH" \ No newline at end of file + git push --set-upstream origin "$BRANCH" + + # Build the mdBook + - name: Build mdBook + run: mdbook build + + # Login in AWs + - name: Configure AWS credentials using OIDC + uses: aws-actions/configure-aws-credentials@v3 + with: + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} + aws-region: us-east-1 + + # Sync the build to S3 + - name: Sync to S3 + run: aws s3 sync ./book s3://hacktricks-cloud/en --delete + + # Login in AWs + - name: Configure AWS credentials using OIDC + uses: aws-actions/configure-aws-credentials@v3 + with: + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} + aws-region: us-east-1 + + # Sync the build to S3 + - name: Sync to S3 + run: aws s3 sync ./book s3://hacktricks-cloud/en --delete \ No newline at end of file diff --git a/.github/workflows/translate_de.yml b/.github/workflows/translate_de.yml index 604b44d22e..b38a93eec6 100644 --- a/.github/workflows/translate_de.yml +++ b/.github/workflows/translate_de.yml @@ -91,10 +91,6 @@ jobs: echo "Translating $(cat /tmp/file_paths.txt)" python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3 - # Build the mdBook - - name: Build mdBook - run: mdbook build - # Push changes to the repository - name: Commit and push changes run: | @@ -102,3 +98,18 @@ jobs: git add -A git commit -m "Translated $BRANCH files" || true git push --set-upstream origin "$BRANCH" + + # Build the mdBook + - name: Build mdBook + run: mdbook build + + # Login in AWs + - name: Configure AWS credentials using OIDC + uses: aws-actions/configure-aws-credentials@v3 + with: + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} + aws-region: us-east-1 + + # Sync the build to S3 + - name: Sync to S3 + run: aws s3 sync ./book s3://hacktricks-cloud/en --delete diff --git a/.github/workflows/translate_gr.yml b/.github/workflows/translate_el.yml similarity index 85% rename from .github/workflows/translate_gr.yml rename to .github/workflows/translate_el.yml index 980c4aee4a..6e926702ba 100644 --- a/.github/workflows/translate_gr.yml +++ b/.github/workflows/translate_el.yml @@ -1,4 +1,4 @@ -name: Translator to GR (Greek) +name: Translator to EL (Greek) on: push: @@ -10,7 +10,7 @@ on: - '.github/**' workflow_dispatch: -concurrency: gr +concurrency: el jobs: run-translation: @@ -18,7 +18,7 @@ jobs: environment: prod env: LANGUAGE: Greek - BRANCH: gr + BRANCH: el steps: - name: Checkout code @@ -91,14 +91,25 @@ jobs: echo "Translating $(cat /tmp/file_paths.txt)" python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3 - # Build the mdBook - - name: Build mdBook - run: mdbook build - # Push changes to the repository - name: Commit and push changes run: | git checkout "$BRANCH" git add -A git commit -m "Translated $BRANCH files" || true - git push --set-upstream origin "$BRANCH" \ No newline at end of file + git push --set-upstream origin "$BRANCH" + + # Build the mdBook + - name: Build mdBook + run: mdbook build + + # Login in AWs + - name: Configure AWS credentials using OIDC + uses: aws-actions/configure-aws-credentials@v3 + with: + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} + aws-region: us-east-1 + + # Sync the build to S3 + - name: Sync to S3 + run: aws s3 sync ./book s3://hacktricks-cloud/en --delete \ No newline at end of file diff --git a/.github/workflows/translate_es.yml b/.github/workflows/translate_es.yml index d6b61364e0..b89f62c469 100644 --- a/.github/workflows/translate_es.yml +++ b/.github/workflows/translate_es.yml @@ -91,10 +91,6 @@ jobs: echo "Translating $(cat /tmp/file_paths.txt)" python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3 - # Build the mdBook - - name: Build mdBook - run: mdbook build - # Push changes to the repository - name: Commit and push changes run: | @@ -102,3 +98,18 @@ jobs: git add -A git commit -m "Translated $BRANCH files" || true git push --set-upstream origin "$BRANCH" + + # Build the mdBook + - name: Build mdBook + run: mdbook build + + # Login in AWs + - name: Configure AWS credentials using OIDC + uses: aws-actions/configure-aws-credentials@v3 + with: + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} + aws-region: us-east-1 + + # Sync the build to S3 + - name: Sync to S3 + run: aws s3 sync ./book s3://hacktricks-cloud/en --delete diff --git a/.github/workflows/translate_fr.yml b/.github/workflows/translate_fr.yml index 2bae366ba1..9bac94f68e 100644 --- a/.github/workflows/translate_fr.yml +++ b/.github/workflows/translate_fr.yml @@ -91,10 +91,6 @@ jobs: echo "Translating $(cat /tmp/file_paths.txt)" python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3 - # Build the mdBook - - name: Build mdBook - run: mdbook build - # Push changes to the repository - name: Commit and push changes run: | @@ -102,3 +98,18 @@ jobs: git add -A git commit -m "Translated $BRANCH files" || true git push --set-upstream origin "$BRANCH" + + # Build the mdBook + - name: Build mdBook + run: mdbook build + + # Login in AWs + - name: Configure AWS credentials using OIDC + uses: aws-actions/configure-aws-credentials@v3 + with: + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} + aws-region: us-east-1 + + # Sync the build to S3 + - name: Sync to S3 + run: aws s3 sync ./book s3://hacktricks-cloud/en --delete diff --git a/.github/workflows/translate_in.yml b/.github/workflows/translate_in.yml index 62678ef6c9..37d876c4c2 100644 --- a/.github/workflows/translate_in.yml +++ b/.github/workflows/translate_in.yml @@ -91,10 +91,6 @@ jobs: echo "Translating $(cat /tmp/file_paths.txt)" python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3 - # Build the mdBook - - name: Build mdBook - run: mdbook build - # Push changes to the repository - name: Commit and push changes run: | @@ -102,3 +98,18 @@ jobs: git add -A git commit -m "Translated $BRANCH files" || true git push --set-upstream origin "$BRANCH" + + # Build the mdBook + - name: Build mdBook + run: mdbook build + + # Login in AWs + - name: Configure AWS credentials using OIDC + uses: aws-actions/configure-aws-credentials@v3 + with: + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} + aws-region: us-east-1 + + # Sync the build to S3 + - name: Sync to S3 + run: aws s3 sync ./book s3://hacktricks-cloud/en --delete diff --git a/.github/workflows/translate_it.yml b/.github/workflows/translate_it.yml index 765c57da5a..be6ee9ea68 100644 --- a/.github/workflows/translate_it.yml +++ b/.github/workflows/translate_it.yml @@ -91,14 +91,25 @@ jobs: echo "Translating $(cat /tmp/file_paths.txt)" python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3 - # Build the mdBook - - name: Build mdBook - run: mdbook build - # Push changes to the repository - name: Commit and push changes run: | git checkout "$BRANCH" git add -A git commit -m "Translated $BRANCH files" || true - git push --set-upstream origin "$BRANCH" \ No newline at end of file + git push --set-upstream origin "$BRANCH" + + # Build the mdBook + - name: Build mdBook + run: mdbook build + + # Login in AWs + - name: Configure AWS credentials using OIDC + uses: aws-actions/configure-aws-credentials@v3 + with: + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} + aws-region: us-east-1 + + # Sync the build to S3 + - name: Sync to S3 + run: aws s3 sync ./book s3://hacktricks-cloud/en --delete \ No newline at end of file diff --git a/.github/workflows/translate_jp.yml b/.github/workflows/translate_ja.yml similarity index 86% rename from .github/workflows/translate_jp.yml rename to .github/workflows/translate_ja.yml index f6670d6f91..08ef94cdfb 100644 --- a/.github/workflows/translate_jp.yml +++ b/.github/workflows/translate_ja.yml @@ -1,4 +1,4 @@ -name: Translator to JP (Japanese) +name: Translator to JA (Japanese) on: push: @@ -10,7 +10,7 @@ on: - '.github/**' workflow_dispatch: -concurrency: jp +concurrency: ja jobs: run-translation: @@ -18,7 +18,7 @@ jobs: environment: prod env: LANGUAGE: Japanese - BRANCH: jp + BRANCH: ja steps: - name: Checkout code @@ -91,10 +91,6 @@ jobs: echo "Translating $(cat /tmp/file_paths.txt)" python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3 - # Build the mdBook - - name: Build mdBook - run: mdbook build - # Push changes to the repository - name: Commit and push changes run: | @@ -102,3 +98,18 @@ jobs: git add -A git commit -m "Translated $BRANCH files" || true git push --set-upstream origin "$BRANCH" + + # Build the mdBook + - name: Build mdBook + run: mdbook build + + # Login in AWs + - name: Configure AWS credentials using OIDC + uses: aws-actions/configure-aws-credentials@v3 + with: + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} + aws-region: us-east-1 + + # Sync the build to S3 + - name: Sync to S3 + run: aws s3 sync ./book s3://hacktricks-cloud/en --delete diff --git a/.github/workflows/translate_kr.yml b/.github/workflows/translate_kr.yml index c406905875..3d7fc8b721 100644 --- a/.github/workflows/translate_kr.yml +++ b/.github/workflows/translate_kr.yml @@ -1,4 +1,4 @@ -name: Translator to KR (Korean) +name: Translator to KO (Korean) on: push: @@ -10,7 +10,7 @@ on: - '.github/**' workflow_dispatch: -concurrency: kr +concurrency: ko jobs: run-translation: @@ -18,7 +18,7 @@ jobs: environment: prod env: LANGUAGE: Korean - BRANCH: kr + BRANCH: ko steps: - name: Checkout code @@ -91,14 +91,25 @@ jobs: echo "Translating $(cat /tmp/file_paths.txt)" python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3 - # Build the mdBook - - name: Build mdBook - run: mdbook build - # Push changes to the repository - name: Commit and push changes run: | git checkout "$BRANCH" git add -A git commit -m "Translated $BRANCH files" || true - git push --set-upstream origin "$BRANCH" \ No newline at end of file + git push --set-upstream origin "$BRANCH" + + # Build the mdBook + - name: Build mdBook + run: mdbook build + + # Login in AWs + - name: Configure AWS credentials using OIDC + uses: aws-actions/configure-aws-credentials@v3 + with: + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} + aws-region: us-east-1 + + # Sync the build to S3 + - name: Sync to S3 + run: aws s3 sync ./book s3://hacktricks-cloud/en --delete \ No newline at end of file diff --git a/.github/workflows/translate_pl.yml b/.github/workflows/translate_pl.yml index c8a2dfb55c..5bbf23ab7b 100644 --- a/.github/workflows/translate_pl.yml +++ b/.github/workflows/translate_pl.yml @@ -91,14 +91,25 @@ jobs: echo "Translating $(cat /tmp/file_paths.txt)" python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3 - # Build the mdBook - - name: Build mdBook - run: mdbook build - # Push changes to the repository - name: Commit and push changes run: | git checkout "$BRANCH" git add -A git commit -m "Translated $BRANCH files" || true - git push --set-upstream origin "$BRANCH" \ No newline at end of file + git push --set-upstream origin "$BRANCH" + + # Build the mdBook + - name: Build mdBook + run: mdbook build + + # Login in AWs + - name: Configure AWS credentials using OIDC + uses: aws-actions/configure-aws-credentials@v3 + with: + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} + aws-region: us-east-1 + + # Sync the build to S3 + - name: Sync to S3 + run: aws s3 sync ./book s3://hacktricks-cloud/en --delete \ No newline at end of file diff --git a/.github/workflows/translate_pt.yml b/.github/workflows/translate_pt.yml index 46de5a19eb..cce3b82b26 100644 --- a/.github/workflows/translate_pt.yml +++ b/.github/workflows/translate_pt.yml @@ -91,10 +91,6 @@ jobs: echo "Translating $(cat /tmp/file_paths.txt)" python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3 - # Build the mdBook - - name: Build mdBook - run: mdbook build - # Push changes to the repository - name: Commit and push changes run: | @@ -102,3 +98,18 @@ jobs: git add -A git commit -m "Translated $BRANCH files" || true git push --set-upstream origin "$BRANCH" + + # Build the mdBook + - name: Build mdBook + run: mdbook build + + # Login in AWs + - name: Configure AWS credentials using OIDC + uses: aws-actions/configure-aws-credentials@v3 + with: + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} + aws-region: us-east-1 + + # Sync the build to S3 + - name: Sync to S3 + run: aws s3 sync ./book s3://hacktricks-cloud/en --delete diff --git a/.github/workflows/translate_rs.yml b/.github/workflows/translate_sr.yml similarity index 85% rename from .github/workflows/translate_rs.yml rename to .github/workflows/translate_sr.yml index 419e9c0d83..0944d1ee06 100644 --- a/.github/workflows/translate_rs.yml +++ b/.github/workflows/translate_sr.yml @@ -1,4 +1,4 @@ -name: Translator to RS (Serbian) +name: Translator to SR (Serbian) on: push: @@ -10,7 +10,7 @@ on: - '.github/**' workflow_dispatch: -concurrency: rs +concurrency: sr jobs: run-translation: @@ -18,7 +18,7 @@ jobs: environment: prod env: LANGUAGE: Serbian - BRANCH: rs + BRANCH: sr steps: - name: Checkout code @@ -91,14 +91,25 @@ jobs: echo "Translating $(cat /tmp/file_paths.txt)" python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3 - # Build the mdBook - - name: Build mdBook - run: mdbook build - # Push changes to the repository - name: Commit and push changes run: | git checkout "$BRANCH" git add -A git commit -m "Translated $BRANCH files" || true - git push --set-upstream origin "$BRANCH" \ No newline at end of file + git push --set-upstream origin "$BRANCH" + + # Build the mdBook + - name: Build mdBook + run: mdbook build + + # Login in AWs + - name: Configure AWS credentials using OIDC + uses: aws-actions/configure-aws-credentials@v3 + with: + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} + aws-region: us-east-1 + + # Sync the build to S3 + - name: Sync to S3 + run: aws s3 sync ./book s3://hacktricks-cloud/en --delete \ No newline at end of file diff --git a/.github/workflows/translate_sw.yml b/.github/workflows/translate_sw.yml index 05090b3df0..f668c5b164 100644 --- a/.github/workflows/translate_sw.yml +++ b/.github/workflows/translate_sw.yml @@ -91,14 +91,25 @@ jobs: echo "Translating $(cat /tmp/file_paths.txt)" python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3 - # Build the mdBook - - name: Build mdBook - run: mdbook build - # Push changes to the repository - name: Commit and push changes run: | git checkout "$BRANCH" git add -A git commit -m "Translated $BRANCH files" || true - git push --set-upstream origin "$BRANCH" \ No newline at end of file + git push --set-upstream origin "$BRANCH" + + # Build the mdBook + - name: Build mdBook + run: mdbook build + + # Login in AWs + - name: Configure AWS credentials using OIDC + uses: aws-actions/configure-aws-credentials@v3 + with: + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} + aws-region: us-east-1 + + # Sync the build to S3 + - name: Sync to S3 + run: aws s3 sync ./book s3://hacktricks-cloud/en --delete \ No newline at end of file diff --git a/.github/workflows/translate_tr.yml b/.github/workflows/translate_tr.yml index 9889a86dd5..35e433e58c 100644 --- a/.github/workflows/translate_tr.yml +++ b/.github/workflows/translate_tr.yml @@ -91,14 +91,25 @@ jobs: echo "Translating $(cat /tmp/file_paths.txt)" python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3 - # Build the mdBook - - name: Build mdBook - run: mdbook build - # Push changes to the repository - name: Commit and push changes run: | git checkout "$BRANCH" git add -A git commit -m "Translated $BRANCH files" || true - git push --set-upstream origin "$BRANCH" \ No newline at end of file + git push --set-upstream origin "$BRANCH" + + # Build the mdBook + - name: Build mdBook + run: mdbook build + + # Login in AWs + - name: Configure AWS credentials using OIDC + uses: aws-actions/configure-aws-credentials@v3 + with: + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} + aws-region: us-east-1 + + # Sync the build to S3 + - name: Sync to S3 + run: aws s3 sync ./book s3://hacktricks-cloud/en --delete \ No newline at end of file diff --git a/.github/workflows/translate_ua.yml b/.github/workflows/translate_uk.yml similarity index 86% rename from .github/workflows/translate_ua.yml rename to .github/workflows/translate_uk.yml index 5a37ade1e9..82e4ad553e 100644 --- a/.github/workflows/translate_ua.yml +++ b/.github/workflows/translate_uk.yml @@ -1,4 +1,4 @@ -name: Translator to UA (Ukranian) +name: Translator to UK (Ukranian) on: push: @@ -10,7 +10,7 @@ on: - '.github/**' workflow_dispatch: -concurrency: ua +concurrency: uk jobs: run-translation: @@ -18,7 +18,7 @@ jobs: environment: prod env: LANGUAGE: Ukranian - BRANCH: ua + BRANCH: uk steps: - name: Checkout code @@ -91,10 +91,6 @@ jobs: echo "Translating $(cat /tmp/file_paths.txt)" python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3 - # Build the mdBook - - name: Build mdBook - run: mdbook build - # Push changes to the repository - name: Commit and push changes run: | @@ -102,3 +98,18 @@ jobs: git add -A git commit -m "Translated $BRANCH files" || true git push --set-upstream origin "$BRANCH" + + # Build the mdBook + - name: Build mdBook + run: mdbook build + + # Login in AWs + - name: Configure AWS credentials using OIDC + uses: aws-actions/configure-aws-credentials@v3 + with: + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} + aws-region: us-east-1 + + # Sync the build to S3 + - name: Sync to S3 + run: aws s3 sync ./book s3://hacktricks-cloud/en --delete diff --git a/.github/workflows/translate_cn.yml b/.github/workflows/translate_zh.yml similarity index 85% rename from .github/workflows/translate_cn.yml rename to .github/workflows/translate_zh.yml index 55923c0ef3..4d70c7a163 100644 --- a/.github/workflows/translate_cn.yml +++ b/.github/workflows/translate_zh.yml @@ -1,4 +1,4 @@ -name: Translator to CN (Chinese) +name: Translator to ZH (Chinese) on: push: @@ -10,7 +10,7 @@ on: - '.github/**' workflow_dispatch: -concurrency: cn +concurrency: zh jobs: run-translation: @@ -18,7 +18,7 @@ jobs: environment: prod env: LANGUAGE: Chinese - BRANCH: cn + BRANCH: zh steps: - name: Checkout code @@ -91,14 +91,25 @@ jobs: echo "Translating $(cat /tmp/file_paths.txt)" python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3 - # Build the mdBook - - name: Build mdBook - run: mdbook build - # Push changes to the repository - name: Commit and push changes run: | git checkout "$BRANCH" git add -A git commit -m "Translated $BRANCH files" || true - git push --set-upstream origin "$BRANCH" \ No newline at end of file + git push --set-upstream origin "$BRANCH" + + # Build the mdBook + - name: Build mdBook + run: mdbook build + + # Login in AWs + - name: Configure AWS credentials using OIDC + uses: aws-actions/configure-aws-credentials@v3 + with: + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} + aws-region: us-east-1 + + # Sync the build to S3 + - name: Sync to S3 + run: aws s3 sync ./book s3://hacktricks-cloud/en --delete \ No newline at end of file