Skip to content

Make langs dynamic #960

Make langs dynamic

Make langs dynamic #960

Workflow file for this run

name: gh-pages
on:
push:
branches:
- master
- dynlangs
schedule:
- cron: '30 1 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
translations:
runs-on: ubuntu-latest
if: (github.event_name == 'schedule' && github.repository == 'opengisch/QField-docs') || (github.event_name != 'schedule')
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Install Python requirements
run: pip install -r requirements.txt
# - name: Install Python requirements insiders
# run: pip install -r requirements-insiders.txt
# env:
# MKDOCS_INSIDERS_TOKEN: ${{ secrets.MKDOCS_INSIDERS_TOKEN }}
- name: Install Transifex client
run: |
curl -OL https://github.com/transifex/cli/releases/download/v1.3.1/tx-linux-amd64.tar.gz
tar -xvzf tx-linux-amd64.tar.gz
- name: Configure Transifex
run: |
python ./utils/transifex_utils.py
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
with:
cmd:yq '.renutil.version' 'mkdocs.yml'

Check failure on line 59 in .github/workflows/gh-pages.yml

View workflow run for this annotation

GitHub Actions / gh-pages

Invalid workflow file

The workflow is not valid. .github/workflows/gh-pages.yml (Line: 59, Col: 11): Unexpected value 'cmd:yq '.renutil.version' 'mkdocs.yml''
- name: Pull translations from Transifex
run: |
./tx pull -t -l ${{ steps.get_langs.outputs.result }}
./tx status
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}
- name: Build documentation
run: mkdocs build
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