Skip to content

Commit

Permalink
ci: fix sphinx conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
js2264 committed Jul 31, 2024
1 parent b5ca0df commit 86dc11d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check
name: Test & Doc

on:
push:
Expand All @@ -18,11 +18,8 @@ jobs:
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
include:
- os: ubuntu-latest
python-version: "3.12"
# - os: windows-latest
# python-version: "3.12"
- os: macos-latest
python-version: "3.12"

runs-on: ${{ matrix.os }}
steps:
Expand All @@ -47,16 +44,20 @@ jobs:
ruff check . --select=E9,F63,F7,F82
pytest
- name: Buid Sphinx doc on ${{ matrix.os }}
if: runner.os == 'Linux' && ${{ github.event_name == 'push' && github.ref == 'refs/heads/devel' }} && ${{ matrix.python-version == '3.12'}}
Doc:
runs-on: ubuntu-latest
steps:

- name: Buid Sphinx doc
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/devel' }}
run: |
sudo apt-get update && sudo apt-get -y install make
pip install -e .[dev,docs]
make -C docs html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
if: runner.os == 'Linux' && matrix.python-version == "3.12" && ${{ github.event_name == 'push' && github.ref == 'refs/heads/devel' }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/devel' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 86dc11d

Please sign in to comment.