Skip to content

Commit 2052e2f

Browse files
committed
Update CI workflows for autodoc & add separate jobs with/wo
1 parent 915df40 commit 2052e2f

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

.github/workflows/build.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,26 @@ permissions:
2020

2121
jobs:
2222
build:
23-
name: Build and Deploy
23+
name: Build and Deploy Autodoc=${{ matrix.build-autodoc }}
2424

2525
runs-on: ubuntu-latest
2626

2727
env:
2828
IS_DEPLOY: ${{ (github.event_name == 'push' && '1') || '0' }}
2929
IS_STAGING: ${{ (github.ref == 'refs/heads/staging' && '1') || '0' }}
3030
IS_MAIN: ${{ ((github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') && '1') || '0' }}
31+
BUILD_AUTODOC: ${{ matrix.build-autodoc }}
32+
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
build-autodoc: ['Yes', 'No']
3137

3238
steps:
3339
- name: Check out repository
3440
uses: actions/checkout@v4
41+
with:
42+
submodules: true
3543
- name: Set up Python
3644
uses: actions/setup-python@v5
3745
with:
@@ -45,12 +53,13 @@ jobs:
4553
echo Deploy: $IS_DEPLOY
4654
echo Prod: $IS_PROD
4755
echo Main: $IS_MAIN
56+
echo Autodoc: $BUILD_AUTODOC
4857
pip list
4958
- name: Build project
5059
shell: bash
5160
run: ./ci/build.sh
5261
- name: Deploy to GitHub Pages
53-
if: env.IS_DEPLOY == '1'
62+
if: env.IS_DEPLOY == '1' && env.BUILD_AUTODOC == 'Yes'
5463
uses: JamesIves/github-pages-deploy-action@v4
5564
with:
5665
folder: docs/_build/html

.github/workflows/check.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
steps:
3232
- name: Checkout repository
3333
uses: actions/checkout@v4
34+
with:
35+
submodules: true
3436
- name: Set up Python
3537
uses: actions/setup-python@v5
3638
with:

ci/build.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
#!/bin/bash -ex
22

3-
nox -s build
3+
if [ "$BUILD_AUTODOC" = "No" ]; then
4+
ARGS=''
5+
else
6+
ARGS='-t autodoc'
7+
fi
8+
9+
nox -s build -- $ARGS

0 commit comments

Comments
 (0)