mirror of
https://gh.wpcy.net/https://github.com/WeblateOrg/weblate.git
synced 2026-04-29 00:22:41 +08:00
* chore(deps): update dependency astral-sh/uv to v0.11.6 * chore(deps): update lockfile --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
168 lines
5.2 KiB
YAML
168 lines
5.2 KiB
YAML
# Copyright © Michal Čihař <michal@weblate.org>
|
|
#
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
name: Documentation
|
|
|
|
on:
|
|
push:
|
|
branches-ignore:
|
|
- renovate/**
|
|
- weblate
|
|
- dependabot/**
|
|
pull_request:
|
|
schedule:
|
|
- cron: 30 5 * * *
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
update-autogenerated-docs:
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
contents: write
|
|
env:
|
|
CI_REDIS_HOST: 127.0.0.1
|
|
CI_REDIS_PORT: '6379'
|
|
CI_DB_PASSWORD: weblate
|
|
CI_DB_HOST: 127.0.0.1
|
|
CI_DB_PORT: '5432'
|
|
CI_SELENIUM: '1'
|
|
DJANGO_SETTINGS_MODULE: weblate.settings_test
|
|
services:
|
|
database:
|
|
image: postgres:18.3-alpine@sha256:4da1a4828be12604092fa55311276f08f9224a74a62dcb4708bd7439e2a03911
|
|
env:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: weblate
|
|
ports:
|
|
- 5432:5432
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
cache:
|
|
image: valkey/valkey:9.0.3-alpine@sha256:e1095c6c76ee982cb2d1e07edbb7fb2a53606630a1d810d5a47c9f646b708bf5
|
|
ports:
|
|
- 6379:6379
|
|
options: >-
|
|
--health-cmd "redis-cli ping"
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
if: github.event_name != 'pull_request' && github.repository_owner == 'WeblateOrg'
|
|
with:
|
|
token: ${{ secrets.WEBLATE_CI_TOKEN }} # zizmor: ignore[secrets-outside-env]
|
|
persist-credentials: true
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
if: github.event_name != 'pull_request' && github.repository_owner != 'WeblateOrg'
|
|
with:
|
|
persist-credentials: true
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
if: github.event_name == 'pull_request'
|
|
with:
|
|
persist-credentials: false
|
|
- name: Set up Python
|
|
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
with:
|
|
python-version: '3.14'
|
|
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
|
|
with:
|
|
enable-cache: false
|
|
version: 0.11.6
|
|
- name: Install apt dependencies
|
|
run: sudo ./ci/apt-install
|
|
- name: Install Python dependencies
|
|
run: ./ci/pip-install latest
|
|
- name: Prepare database
|
|
run: ./ci/prepare-database
|
|
- name: Migrate database
|
|
run: uv run --frozen ./manage.py migrate --noinput --traceback
|
|
- run: make -C docs update-docs
|
|
|
|
- name: Commit or create pull request
|
|
uses: ./.github/actions/auto-commit
|
|
with:
|
|
message: 'docs: Documentation snippets update'
|
|
pr-branch: create-pull-request/doc-snippets-update
|
|
pr-labels: |
|
|
dependencies
|
|
github-token: ${{ secrets.WEBLATE_CI_TOKEN }} # zizmor: ignore[secrets-outside-env]
|
|
|
|
list-languages:
|
|
runs-on: ubuntu-24.04
|
|
needs:
|
|
- update-autogenerated-docs
|
|
outputs:
|
|
languages: ${{ steps.list.outputs.languages }}
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
|
|
with:
|
|
enable-cache: false
|
|
version: 0.11.6
|
|
- name: Set up Python
|
|
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
with:
|
|
python-version: '3.14'
|
|
- run: uv run --no-project scripts/list-documentation-languages.py >>"$GITHUB_OUTPUT"
|
|
id: list
|
|
|
|
translations:
|
|
runs-on: ubuntu-24.04
|
|
needs:
|
|
- list-languages
|
|
name: Sphinx
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
language: ${{ fromJson(needs.list-languages.outputs.languages) }}
|
|
env:
|
|
READTHEDOCS_LANGUAGE: ${{ matrix.language }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
|
|
with:
|
|
enable-cache: false
|
|
version: 0.11.6
|
|
- name: Set up Python
|
|
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
with:
|
|
python-version: '3.14'
|
|
- name: Install apt dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y graphviz
|
|
- name: Install Python dependencies
|
|
run: uv sync --only-group docs --frozen
|
|
- name: Sphinx build
|
|
run: |
|
|
. .venv/bin/activate
|
|
echo "::add-matcher::.github/matchers/sphinx.json"
|
|
./ci/run-docs
|
|
echo "::remove-matcher owner=sphinx::"
|
|
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
|
with:
|
|
name: Documentation ${{ matrix.language }}
|
|
path: docs/_build/html
|
|
|
|
build:
|
|
runs-on: ubuntu-slim
|
|
name: Sphinx
|
|
needs:
|
|
- translations
|
|
steps:
|
|
# This is dependency only job to collect all test results
|
|
- run: echo
|