Skip to content

Commit 050f6fa

Browse files
committed
Move docs creation to main workflow
1 parent 762793e commit 050f6fa

2 files changed

Lines changed: 35 additions & 38 deletions

File tree

.github/workflows/deploy-docs.yaml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/python-app.yaml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,38 @@ jobs:
181181
# Install from PyPI
182182
pip install $PACKAGE_NAME
183183
# Basic import test
184-
python -c "import flixopt; print('PyPI installation successful!')"
184+
python -c "import flixopt; print('PyPI installation successful!')"
185+
186+
deploy-docs:
187+
name: Deploy Documentation
188+
runs-on: ubuntu-22.04
189+
needs: [publish-pypi] # Deploy docs after successful PyPI publishing
190+
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'alpha') && !contains(github.ref, 'beta') && !contains(github.ref, 'rc')
191+
192+
steps:
193+
- name: Checkout repository
194+
uses: actions/checkout@v4
195+
with:
196+
fetch-depth: 0 # Fetch all history for proper versioning
197+
198+
- name: Set up Python
199+
uses: actions/setup-python@v4
200+
with:
201+
python-version: "3.11"
202+
203+
- name: Install documentation dependencies
204+
run: |
205+
python -m pip install --upgrade pip
206+
pip install -e ".[docs]"
207+
208+
- name: Configure Git Credentials
209+
run: |
210+
git config user.name github-actions[bot]
211+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
212+
213+
- name: Deploy docs
214+
run: |
215+
VERSION=${GITHUB_REF#refs/tags/v}
216+
echo "Deploying docs after successful PyPI publish: $VERSION"
217+
mike deploy --push --update-aliases $VERSION latest
218+
mike set-default --push latest

0 commit comments

Comments
 (0)