Skip to content

Bump docker/setup-buildx-action from 2 to 3 (#120) #116

Bump docker/setup-buildx-action from 2 to 3 (#120)

Bump docker/setup-buildx-action from 2 to 3 (#120) #116

Workflow file for this run

name: Website MkDocs
on:
push:
branches:
- master
# - website*
paths:
- 'website/**'
- '.github/workflows/website.yml'
workflow_dispatch: # useful for testing tx pushes
workflow_call:
permissions:
contents: write
defaults:
run:
working-directory: website
jobs:
deploy:
runs-on: ubuntu-latest
# Skip if this job was scheduled and the runner belongs to a fork (i.e. forks have no use for this action)
if: (github.event_name == 'schedule' && github.repository == 'opengisch/QField-docs') || (github.event_name != 'schedule')
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Python requirements
run: pip install -r requirements.txt
- name: Install Python requirements insiders
run: pip install -r requirements-insiders.txt
env:
GH_USER_INSIDER: ${{ secrets.GH_USER_INSIDER }}
GH_TOKEN_INSIDER: ${{ secrets.GH_TOKEN_INSIDER }}
- 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 --translations --all --minimum-perc 10
./tx status
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}
- name: Build documentation
run: mkdocs build
env:
DEFAULT_LANGUAGE_ONLY: false
- name: Datamodel Documentation
run: |
LATEST_RELEASE=$(curl --silent "https://api.github.com/repos/opengisch/signalo/releases/latest" | jq -r .tag_name)
wget -q https://github.com/opengisch/signalo/releases/download/${LATEST_RELEASE}/signalo-${LATEST_RELEASE}-model-documentation.zip
unzip -q signalo-${LATEST_RELEASE}-model-documentation.zip
cp -r model-documentation site/
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4.4.3
with:
branch: gh-pages
clean: true
folder: ./website/site