Skip to content

Commit

Permalink
Make langs dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Dec 15, 2023
1 parent 0587307 commit bda5ae4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- master
- dynlangs
schedule:
- cron: '30 1 * * *'
workflow_dispatch:
Expand Down Expand Up @@ -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 }}
Expand All @@ -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 }}

0 comments on commit bda5ae4

Please sign in to comment.