Skip to content

Commit

Permalink
Merge pull request #2 from KlugerLab/doc_workflow
Browse files Browse the repository at this point in the history
Create documentation.yml
  • Loading branch information
fra-pcmgf authored Aug 9, 2024
2 parents e3588fb + f461e1b commit 0d525b1
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 5 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Adapted from https://coderefinery.github.io/documentation/gh_workflow/
name: documentation

on:
push:
tags:
- '*'
workflow_dispatch:

permissions:
contents: write
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
docs:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install -r docs/requirements.txt
- name: Sphinx build
run: |
sphinx-build docs/source _build
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '_build'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
push:
tags:
- '*'
workflow_dispatch:

jobs:
build:
Expand Down
2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
matplotlib>=3.6
numpy>=1.25
sphinx==8.0.2
intersphinx-registry
myst-parser
Expand Down
6 changes: 1 addition & 5 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath('../..'))

# Configuration file for the Sphinx documentation builder.
#
Expand All @@ -28,12 +29,7 @@
'sphinx.ext.coverage',
'sphinx.ext.doctest',
'sphinx.ext.autosummary',
# 'sphinx.ext.graphviz',
# 'sphinx.ext.ifconfig',
'matplotlib.sphinxext.plot_directive',
# 'IPython.sphinxext.ipython_console_highlighting',
# 'IPython.sphinxext.ipython_directive',
# 'sphinx.ext.imgmath',
]

templates_path = ['_templates']
Expand Down

0 comments on commit 0d525b1

Please sign in to comment.