Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 43 additions & 9 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# This job installs dependencies, build the website, and pushes it to `gh-pages`
permissions:
contents: read

jobs:
deploy-website:
# This job installs dependencies, builds the website, and uploads it as an artifact
build-site:
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -23,6 +26,7 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

# Install dependencies
- name: Setup Conda Environment
uses: mamba-org/setup-micromamba@f457c30a868e4760d3a6fcea5f25dc655b8edf39 # v3.2.1
Expand All @@ -33,16 +37,46 @@ jobs:
- name: Install PySP2
run: |
pip install -e . --no-deps --force-reinstall

# Build the website
- name: Build the site
run: |
cd docs
make html
# Push the book's HTML to github-pages
- name: GitHub Pages action
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
if: github.ref == 'refs/heads/main'

# Upload the built site so it can be used by the deploy job
- name: Upload site artifact
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: site-html
path: docs/build/html

# This job downloads the built site and deploys it to GitHub Pages
deploy-site:
needs: build-site
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Download site artifact
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: site-html
path: docs/build/html

- name: Setup Pages
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html
cname: https://arm-doe.github.io/PySP2/
path: docs/build/html

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
4 changes: 2 additions & 2 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
name: Install Python
with:
python-version: 3.14
python-version: 3.14.9

- name: Install dependencies
run: |
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
name: Install Python
with:
python-version: "3.x"
python-version: "3.14.9"
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: releases
Expand Down
Loading