feat: Add bulk accept suggestions feature (#17712) #40499
This file contains hidden or 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
| # Copyright © Michal Čihař <michal@weblate.org> | |
| # | |
| # SPDX-License-Identifier: GPL-3.0-or-later | |
| name: Documentation | |
| on: | |
| push: | |
| branches-ignore: | |
| - renovate/** | |
| - weblate | |
| 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-snippets: | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: write | |
| env: | |
| CI_DATABASE: postgresql | |
| CI_REDIS_HOST: 127.0.0.1 | |
| CI_REDIS_PORT: '60001' | |
| CI_DB_PASSWORD: weblate | |
| CI_DB_HOST: 127.0.0.1 | |
| CI_DB_PORT: '60000' | |
| CI_SELENIUM: '1' | |
| DJANGO_SETTINGS_MODULE: weblate.settings_test | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| if: github.event_name != 'pull_request' && github.repository_owner == 'WeblateOrg' | |
| with: | |
| token: ${{ secrets.WEBLATE_CI_TOKEN }} | |
| 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@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0 | |
| with: | |
| enable-cache: false | |
| version: 0.9.27 | |
| - name: Install apt dependencies | |
| run: sudo ./ci/apt-install "$CI_DATABASE" | |
| - name: Install Python dependencies | |
| run: ./ci/pip-install latest | |
| - run: make -C docs update-doc-snippets | |
| - run: git diff | |
| - run: uv run --only-group pre-commit pre-commit run --all | |
| continue-on-error: true | |
| - 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 }} | |
| list-languages: | |
| runs-on: ubuntu-24.04 | |
| needs: | |
| - update-snippets | |
| outputs: | |
| languages: ${{ steps.list.outputs.languages }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0 | |
| with: | |
| enable-cache: false | |
| version: 0.9.27 | |
| - 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@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0 | |
| with: | |
| enable-cache: false | |
| version: 0.9.27 | |
| - 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@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: Documentation ${{ matrix.language }} | |
| path: docs/_build/html | |
| build: | |
| runs-on: ubuntu-24.04 | |
| name: Sphinx | |
| needs: | |
| - translations | |
| steps: | |
| # This is dependency only job to collect all test results | |
| - run: echo |