Skip to content

Commit cda6406

Browse files
Manual + automatic doc deplyement
1 parent e96c11d commit cda6406

File tree

2 files changed

+41
-40
lines changed

2 files changed

+41
-40
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "Build and Deploy Documentation 📖"
2+
3+
on:
4+
push:
5+
paths:
6+
- 'doc/**' # Déclenche uniquement si un fichier dans doc/ change
7+
workflow_dispatch: # Permet de déclencher manuellement
8+
9+
jobs:
10+
deploy-docs:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.10'
21+
22+
- name: Install dependencies
23+
run: |
24+
pip install hestonpy
25+
pip install sphinx
26+
pip install pydata-sphinx-theme sphinx-design nbsphinx myst-parser
27+
sudo apt install pandoc
28+
pip install pandoc
29+
30+
- name: Build Sphinx documentation
31+
run: |
32+
cd doc
33+
make html
34+
35+
- name: Deploy to GitHub Pages
36+
uses: peaceiris/actions-gh-pages@v4
37+
with:
38+
github_token: ${{ secrets.GITHUB_TOKEN }}
39+
publish_dir: doc/_build/html
40+
branch: gh-pages

.github/workflows/python-publish.yml

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -121,43 +121,4 @@ jobs:
121121
- name: Publish distribution 📦 to TestPyPI
122122
uses: pypa/gh-action-pypi-publish@release/v1
123123
with:
124-
repository-url: https://test.pypi.org/legacy/
125-
126-
## Déploiement de la documentation après publication sur TestPyPI
127-
deploy-docs:
128-
name: "Build and Deploy Documentation 📖"
129-
needs:
130-
- publish-to-testpypi
131-
runs-on: ubuntu-latest
132-
133-
steps:
134-
- name: Checkout repository
135-
uses: actions/checkout@v4
136-
137-
- name: Set up Python
138-
uses: actions/setup-python@v4
139-
with:
140-
python-version: '3.10'
141-
142-
- name: Install dependencies
143-
run: |
144-
python -m pip install --upgrade pip
145-
pip install hestonpy
146-
pip install sphinx
147-
pip install pydata-sphinx-theme
148-
pip install sphinx-design
149-
pip install nbsphinx
150-
pip install myst-parser
151-
152-
153-
- name: Build Sphinx documentation
154-
run: |
155-
cd doc
156-
make html
157-
158-
- name: Deploy to GitHub Pages
159-
uses: peaceiris/actions-gh-pages@v4
160-
with:
161-
github_token: ${{ secrets.GITHUB_TOKEN }}
162-
publish_dir: doc/_build/html
163-
branch: gh-pages
124+
repository-url: https://test.pypi.org/legacy/

0 commit comments

Comments
 (0)