Skip to content

Commit

Permalink
Test tutorials before publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliottKasoar committed Feb 3, 2025
1 parent dccba53 commit 70cfc0c
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/publish-on-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,47 @@ on:
- v[0-9]+.[0-9]+.[0-9]+*

jobs:
build-docs:
runs-on: ubuntu-latest
if: github.repository == 'stfc/janus-core' && startsWith(github.ref, 'refs/tags/v')
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true

steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "0.5.7"
python-version: "3.12"

- name: Install dependencies
run: uv sync --all-extras

- name: Build docs with tutorials
run: cd docs && uv run make all

- name: upload
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: './docs/build/html/.'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

publish:
needs: build-docs
runs-on: ubuntu-latest
if: github.repository == 'stfc/janus-core' && startsWith(github.ref, 'refs/tags/v')
environment:
Expand Down

0 comments on commit 70cfc0c

Please sign in to comment.