Bump actions/setup-python from 4 to 5 #82
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: doc | |
on: | |
pull_request: | |
branches: | |
- master | |
paths: | |
- 'docs/**' | |
- '.github/workflows/doc.yml' | |
push: | |
branches: | |
- master | |
paths: | |
- 'docs/**' | |
- '.github/workflows/doc.yml' | |
workflow_dispatch: # useful for testing tx pushes | |
workflow_call: | |
permissions: | |
contents: write | |
defaults: | |
run: | |
working-directory: docs | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
env: | |
TX_TOKEN: ${{ secrets.TX_TOKEN }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Checkout Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install Python requirements | |
run: pip install -r requirements.txt | |
- name: Install Transifex client | |
run: | | |
curl -OL https://github.com/transifex/cli/releases/download/v1.6.10/tx-linux-amd64.tar.gz | |
tar -xvzf tx-linux-amd64.tar.gz | |
- name: Configure Transifex | |
run: scripts/transifex_utils.py | |
env: | |
TX_TOKEN: ${{ secrets.TX_TOKEN }} | |
- name: Push source files to Transifex | |
if: ${{ github.event_name == 'push' }} | |
run: ./tx push | |
env: | |
TX_TOKEN: ${{ secrets.TX_TOKEN }} | |
- name: Pull translations from Transifex | |
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == 'opengisch/QgisModelBaker' }} | |
run: | | |
./tx pull --translations --all --minimum-perc 10 | |
./tx status | |
env: | |
TX_TOKEN: ${{ secrets.TX_TOKEN }} | |
- name: Build documentation | |
run: mkdocs build | |
- uses: actions/upload-artifact@v4 | |
if: ${{ github.event_name == 'pull_request' }} | |
with: | |
name: docs | |
path: docs/site | |
if-no-files-found: error | |
- name: Deploy to GitHub Pages | |
if: ${{ github.event_name == 'push' }} | |
run: mkdocs gh-deploy --force |