Skip to content

Commit

Permalink
Factor out sphinx from testing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pnsaevik committed Oct 20, 2023
1 parent c0814b3 commit 9f1bc66
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 12 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ jobs:
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Testing
id: build_sphinx
uses: ./.github/workflows/testing.yml
- name: Checkout
uses: actions/checkout@v3
- name: Build sphinx
uses: ./.github/workflows/sphinx.yml
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
18 changes: 18 additions & 0 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Build sphinx

on:
workflow_call: {}

jobs:
sphinx:
runs-on: ubuntu-latest
name: Build sphinx
steps:
- name: Install sphinx
run: pip install sphinx
- name: Build documentation
run: sphinx-build -v -b html -n doc/source doc/build
- name: Upload documentation
uses: actions/upload-pages-artifact@v2
with:
path: doc/build/
11 changes: 2 additions & 9 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches:
- "**"
- "!master"
workflow_call: {}

jobs:
test:
Expand All @@ -20,11 +19,5 @@ jobs:
run: pip install pytest
- name: Testing
run: pytest
- name: Install sphinx
run: pip install sphinx
- name: Build documentation
run: sphinx-build -v -b html -n doc/source doc/build
- name: Upload documentation
uses: actions/upload-pages-artifact@v2
with:
path: doc/build/
- name: Build sphinx
uses: ./.github/workflows/sphinx.yml

0 comments on commit 9f1bc66

Please sign in to comment.