From bda5ae4aef94a2f6dd491bbc5a4b7b6c4c014cd2 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 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index b757eeaf89..774eee9787 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: @@ -51,9 +52,15 @@ jobs: env: TX_TOKEN: ${{ secrets.TX_TOKEN }} + - name: Get all languages + id: get_langs + uses: mikefarah/yq@v4 + with: + cmd: '.plugins[] | .i18n.languages | keys | 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 }} @@ -64,9 +71,9 @@ jobs: DEFAULT_LANGUAGE_ONLY: false - name: Deploy to GitHub Pages + if: branch == 'master' uses: JamesIves/github-pages-deploy-action@v4 with: branch: gh-pages clean: true folder: site - ssh-key: ${{ secrets.DEPLOY_TO_GH_PAGES_PRIVATE_KEY }}