forked from WeblateOrg/weblate
-
Notifications
You must be signed in to change notification settings - Fork 3
142 lines (133 loc) · 4.25 KB
/
docs.yml
File metadata and controls
142 lines (133 loc) · 4.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# 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@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
with:
enable-cache: false
version: 0.10.6
- 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
- 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@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
with:
enable-cache: false
version: 0.10.6
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.14'
- run: uv run --frozen --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@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
with:
enable-cache: false
version: 0.10.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@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