From 843c680f3bb56c6fc39349e27e02ada87ea622d1 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 | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index b757eeaf89..7d7b1566fe 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: yq '.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 }} @@ -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