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 6284049
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 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 @@ -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/[email protected]
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 }}
Expand All @@ -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

0 comments on commit 6284049

Please sign in to comment.