Skip to content

gh-pages

gh-pages #924

Workflow file for this run

name: gh-pages
on:
push:
branches:
- master
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: Pull translations from Transifex
run: |
./tx pull -t -l en,de,fr,it,es,zh,pt,ja
./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
ssh-key: ${{ secrets.DEPLOY_TO_GH_PAGES_PRIVATE_KEY }}