Skip to content

Commit

Permalink
Update deploy workflow to build and deploy sphinx website.
Browse files Browse the repository at this point in the history
  • Loading branch information
arokem committed Oct 31, 2024
1 parent bb2ec97 commit 901b352
Showing 1 changed file with 35 additions and 35 deletions.
70 changes: 35 additions & 35 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages
name: Deploy website

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
on: [push, pull_request]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
contents: write

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Checkout repo
uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Build site
run: |
cd docs
make html
- name: Upload docs
uses: actions/upload-artifact@v4
with:
name: docs
path: docs/build/html
- name: Publish docs to Github Pages
if: startsWith(github.event.ref, 'refs/tags')
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
folder: build/html

0 comments on commit 901b352

Please sign in to comment.