Skip to content

Commit

Permalink
Add deploy-docs workflow for Sphinx -> GitHub Pages deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
krishnans2006 committed Jun 9, 2024
1 parent 1113e5e commit 173a7d8
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:

- name: Run Tests
run: pipenv run python3 manage.py test

docs:
runs-on: ubuntu-latest

Expand Down Expand Up @@ -68,6 +69,5 @@ jobs:

- name: Build Docs
run: |
cd docs
pipenv run make html
60 changes: 60 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Deploy docs

on:
push:
branches: [master]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
python-version:
- 3.8

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pipenv

- name: Install Sphinx
run: sudo apt-get install python3-sphinx

- name: Install pipenv
run: pip install pipenv

- name: Install dependencies
run: pipenv install --dev

- name: Build docs
run: |
cd docs
pipenv run make html
- name: Upload docs artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/build/html

deploy:
runs-on: ubuntu-latest
needs: build

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

permissions:
pages: write
id-token: write

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

0 comments on commit 173a7d8

Please sign in to comment.