From 6284049f5d982bfd17ef5252b02a698d7d8db9b8 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Fri, 15 Dec 2023 09:42:36 +0100 Subject: [PATCH] Make langs dynamic --- .github/workflows/gh-pages.yml | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index b757eeaf89..3f1a2db661 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -4,6 +4,7 @@ on: push: branches: - master + - dynlangs schedule: - cron: '30 1 * * *' workflow_dispatch: @@ -45,15 +46,21 @@ jobs: env: TX_TOKEN: ${{ secrets.TX_TOKEN }} - - name: Push source files to Transifex - run: | - ./tx push - env: - TX_TOKEN: ${{ secrets.TX_TOKEN }} + # - name: Push source files to Transifex + # run: | + # ./tx push + # env: + # TX_TOKEN: ${{ secrets.TX_TOKEN }} + + - name: Get all languages + id: get_langs + uses: mikefarah/yq@v4.40.5 + with: + cmd: yq '.plugins[] | .i18n.languages | select( . != null ) | map(.locale) | join(",")' mkdocs.yml - name: Pull translations from Transifex run: | - ./tx pull -t -l en,de,fr,it,es,zh,pt,ja + ./tx pull -t -l ${{ steps.get_langs.outputs.result }} ./tx status env: TX_TOKEN: ${{ secrets.TX_TOKEN }} @@ -63,10 +70,9 @@ jobs: env: DEFAULT_LANGUAGE_ONLY: false - - name: Deploy to GitHub Pages - uses: JamesIves/github-pages-deploy-action@v4 - with: - branch: gh-pages - clean: true - folder: site - ssh-key: ${{ secrets.DEPLOY_TO_GH_PAGES_PRIVATE_KEY }} + # - name: Deploy to GitHub Pages + # uses: JamesIves/github-pages-deploy-action@v4 + # with: + # branch: gh-pages + # clean: true + # folder: site