Skip to content

Commit 08b3e6c

Browse files
committed
[REF] Github workflow for documentation :
- simplify installation, using oca container. - bump actions versions, using latest versions for checkout, add-and-commit
1 parent e0e737f commit 08b3e6c

File tree

3 files changed

+19
-70
lines changed

3 files changed

+19
-70
lines changed

Diff for: .github/workflows/documentation-commit.yml

+9-34
Original file line numberDiff line numberDiff line change
@@ -12,53 +12,28 @@ on:
1212
jobs:
1313
documentation-commit:
1414
runs-on: ubuntu-22.04
15+
container: ghcr.io/oca/oca-ci/py3.10-odoo16.0:latest
1516
steps:
16-
- name: Check out OpenUpgrade Documentation
17-
uses: actions/checkout@v2
1817

19-
- name: Set up Python
20-
uses: actions/setup-python@v4
21-
with:
22-
python-version: '3.10'
23-
- name: Check out Odoo
24-
uses: actions/checkout@v2
25-
with:
26-
repository: odoo/odoo
27-
ref: "16.0"
28-
fetch-depth: 1
29-
path: odoo
30-
- name: Configuration
18+
- uses: actions/checkout@v3
19+
20+
# See: https://github.com/OCA/openupgradelib/pull/324#issuecomment-1556255121
21+
- name: configure Git
3122
run: |
32-
sudo apt update
33-
sudo apt install \
34-
expect \
35-
expect-dev \
36-
libevent-dev \
37-
libldap2-dev \
38-
libsasl2-dev \
39-
libxml2-dev \
40-
libxslt1-dev \
41-
nodejs \
42-
python3-lxml \
43-
python3-passlib \
44-
python3-psycopg2 \
45-
python3-serial \
46-
python3-simplejson \
47-
python3-werkzeug \
48-
python3-yaml \
49-
unixodbc-dev
23+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
24+
5025
- name: Requirements Installation
5126
run: |
52-
pip install -r odoo/requirements.txt
5327
pip install -e .
5428
pip install -r ./doc_requirements.txt
29+
5530
- name: OpenUpgradelib Docs
5631
run: |
5732
# try to build the documentation
5833
python3 -m sphinx -W -d ./docs/.doctrees ./docsource ./docs
5934
6035
- name: Commit changes
61-
uses: EndBug/add-and-commit@v7
36+
uses: EndBug/add-and-commit@v9
6237
with:
6338
add: "docs"
6439
default_author: github_actions

Diff for: .github/workflows/documentation.yml

+8-34
Original file line numberDiff line numberDiff line change
@@ -8,45 +8,19 @@ on:
88

99
jobs:
1010
documentation:
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-22.04
12+
container: ghcr.io/oca/oca-ci/py3.10-odoo16.0:latest
1213
steps:
13-
- name: Check out OpenUpgrade Documentation
14-
uses: actions/checkout@v2
1514

16-
- name: Set up Python
17-
uses: actions/setup-python@v4
18-
with:
19-
python-version: '3.10'
20-
- name: Check out Odoo
21-
uses: actions/checkout@v2
22-
with:
23-
repository: odoo/odoo
24-
ref: "16.0"
25-
fetch-depth: 1
26-
path: odoo
27-
- name: Configuration
15+
- uses: actions/checkout@v3
16+
17+
# See: https://github.com/OCA/openupgradelib/pull/324#issuecomment-1556255121
18+
- name: configure Git
2819
run: |
29-
sudo apt update
30-
sudo apt install \
31-
expect \
32-
expect-dev \
33-
libevent-dev \
34-
libldap2-dev \
35-
libsasl2-dev \
36-
libxml2-dev \
37-
libxslt1-dev \
38-
nodejs \
39-
python3-lxml \
40-
python3-passlib \
41-
python3-psycopg2 \
42-
python3-serial \
43-
python3-simplejson \
44-
python3-werkzeug \
45-
python3-yaml \
46-
unixodbc-dev
20+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
21+
4722
- name: Requirements Installation
4823
run: |
49-
pip install -q -r odoo/requirements.txt
5024
pip install -e .
5125
pip install -r ./doc_requirements.txt
5226

Diff for: DEVELOP.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ To contribute to the openupgradelib documentation:
1313
1414
git clone https://github.com/odoo/odoo -b 16.0 --depth=1 ./src/odoo
1515
virtualenv env --python=python3.10
16+
./env/bin/pip install -r ./src/odoo/requirements.txt
1617
./env/bin/pip install -e ./src/odoo/
1718
./env/bin/pip install -e .
1819
./env/bin/pip install -r ./doc_requirements.txt
@@ -24,5 +25,4 @@ To contribute to the openupgradelib documentation:
2425

2526
.. code:: shell
2627
27-
. ./env/bin/activate
28-
python3 -m sphinx -W -d ./docs/.doctrees ./docsource ./docs
28+
./env/bin/python -m sphinx -W -d ./docs/.doctrees ./docsource ./docs

0 commit comments

Comments
 (0)