Skip to content

Commit 723b1be

Browse files
committed
[misc] Generate and Update API Docs to mariadb documentation
1 parent 541c985 commit 723b1be

File tree

2 files changed

+30
-10
lines changed

2 files changed

+30
-10
lines changed

.github/workflows/release.yml

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
name: Generate Docs and Update Documentation Repository
1+
name: Generate and Update API Docs
22

33
on:
4-
push:
54
workflow_dispatch: # Allow manual triggering
5+
release:
6+
types: [published] # Runs when release is published
67

78
jobs:
89
update-docs:
@@ -19,6 +20,24 @@ jobs:
1920
with:
2021
python-version: '3.12'
2122

23+
24+
- name: Clone C/C
25+
uses: GuillaumeFalourd/clone-github-repo-action@v2.3
26+
with:
27+
branch: '3.4'
28+
owner: 'mariadb-corporation'
29+
repository: 'mariadb-connector-c'
30+
31+
- name: c/c make ubuntu
32+
run: |
33+
cd ${{ github.workspace }}/mariadb-connector-c
34+
cmake . -DCMAKE_BUILD_TYPE=Release -DWITH_EXTERNAL_ZLIB=On -DCMAKE_INSTALL_PREFIX=/usr
35+
make -j4
36+
sudo make install
37+
echo "MARIADB_PLUGIN_DIR=`mariadb_config --plugindir`" >> $GITHUB_ENV
38+
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/mariadb" >> $GITHUB_ENV
39+
40+
2241
- name: Install dependencies
2342
run: |
2443
# Install your project dependencies
@@ -32,26 +51,27 @@ jobs:
3251
- name: Checkout documentation repository
3352
uses: actions/checkout@v4
3453
with:
35-
repository: rusher/mariadb-docs # Replace with actual repo
36-
token: ${{ secrets.DOCS_REPO_TOKEN }}
37-
path: docs-repo
54+
repository: mariadb-corporation/mariadb-docs # Replace with actual repo
55+
token: ${{ secrets.SPHINX_TOKEN }}
56+
path: mariadb-docs
3857

3958
- name: Update documentation subdirectory
4059
run: |
4160
# Remove existing documentation in target subdirectory
42-
rm -rf docs-repo/mariadb-docs/connectors/mariadb-connector-python/api/*
4361
62+
mkdir -p mariadb-docs/connectors/mariadb-connector-python/api/
63+
rm -rf mariadb-docs/connectors/mariadb-connector-python/api/*
4464
# Copy new documentation
45-
cp -r docs/_build/markdown/* docs-repo/mariadb-docs/connectors/mariadb-connector-python/api/
65+
cp -r docs/_build/markdown/* mariadb-docs/connectors/mariadb-connector-python/api/
4666
4767
# Optional: Add any additional processing here
4868
# e.g., update index files, fix relative links, etc.
4969
5070
- name: Create Pull Request
5171
uses: peter-evans/create-pull-request@v5
5272
with:
53-
token: ${{ secrets.DOCS_REPO_TOKEN }}
54-
path: docs-repo
73+
token: ${{ secrets.SPHINX_TOKEN }}
74+
path: mariadb-docs
5575
commit-message: "Update API documentation from ${{ github.repository }}"
5676
title: "Auto-update: API Documentation from ${{ github.repository }}"
5777
body: |

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
4040
# ones.
4141
extensions = ['sphinx.ext.doctest', 'sphinx.ext.autodoc', 'sphinx.ext.intersphinx',
42-
'sphinx.ext.extlinks', 'sphinx_toolbox.collapse', 'myst_parser', 'sphinx_markdown_builder' ]
42+
'sphinx.ext.extlinks', 'myst_parser', 'sphinx_markdown_builder' ]
4343

4444
# Add any paths that contain templates here, relative to this directory.
4545
templates_path = ['_templates']

0 commit comments

Comments
 (0)