diff --git a/.github/workflows/translate-readme.yml b/.github/workflows/development.yml similarity index 92% rename from .github/workflows/translate-readme.yml rename to .github/workflows/development.yml index 335fb8c..1274135 100644 --- a/.github/workflows/translate-readme.yml +++ b/.github/workflows/development.yml @@ -22,7 +22,7 @@ jobs: - name: Push to GitHub uses: crazy-max/ghaction-github-pages@v3.1.0 with: - target_branch: translations + target_branch: translations_indev build_dir: 'dist' env: GITHUB_TOKEN: ${{ secrets.GTK }} diff --git a/.github/workflows/example.yml b/.github/workflows/example.yml new file mode 100644 index 0000000..e42afa1 --- /dev/null +++ b/.github/workflows/example.yml @@ -0,0 +1,32 @@ +name: Generate Localized Readme # The name of your action + +on: + workflow_dispatch: # Manual start + push: # Run when committing to a branch + branches: + - master # Set the name of your branch if required + paths: # Start translating only if readme file changed in current push + - 'README.MD' + - 'README.md' + - 'readme.md' + - 'Readme.md' + +jobs: + translate: # Task name + runs-on: ubuntu-latest # Running on an Ubuntu image + steps: + - name: Checkout code # Step: code check + uses: actions/checkout@v2 # Using an action to test the code + + - name: Run translation # Step: start the translation + uses: mrf0rtuna4/Github-Readme-AutoTranslator@v1.3.0 # Using an action to translate + env: + LANGS: 'english,italian,dutch,spanish' # List of languages to be translated + + - name: Push to GitHub # Step: Submit changes to GitHub + uses: crazy-max/ghaction-github-pages@v3.1.0 # Using an action to publish to GitHub Pages + with: + target_branch: translations # The branch to which the changes will be sent + build_dir: 'dist' # The directory with the collected files + env: + GITHUB_TOKEN: ${{ secrets.GTK }} # Transferring a GitHub access token diff --git a/README.md b/README.md index cebc485..70b173f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # GitHub Readme AutoTranslator