Skip to content

Commit

Permalink
Add CI on documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ekwaly committed Jul 11, 2024
1 parent ea52f0f commit 923e19c
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 13 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy Sphinx documentation to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: main

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# 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

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
check-latest: true
cache: 'pip'
cache-dependency-path: './docs/requirements.txt'
- name: Install dependencies
run: |
pip install -r ./docs/requirements.txt
- name: Build documentation
run: |
sphinx-build -M html ./docs/source _build/
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: '_build/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# IDE settings
.idea
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## What can it do ?

- [ ] compile and deploy documentation
- [x] compile and deploy documentation
- [ ] create a release
- [ ] add automatic publication on pypi
- [ ] add automatic publication on conda repository
Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sphinx-rtd-theme
5 changes: 2 additions & 3 deletions docs/conf.py → docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@

# -- Project information -----------------------------------------------------

project = 'icetrackpy'
copyright = '2024, Martin THIRIET'
author = 'Martin THIRIET'
project = 'python_lib_quickstart'
author = 'IGE Calcul'

# The full version, including alpha/beta/rc tags
release = '0.1'
Expand Down
2 changes: 1 addition & 1 deletion docs/func_o.rst → docs/source/func_o.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ Functions overview

My awesome function
*******************
.. automodule:: pylib_quick.pylib_quick
.. automodule:: python_lib_quickstart.python_lib_quickstart
:special-members:
:members:
4 changes: 2 additions & 2 deletions docs/index.rst → docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.. pylib_quick documentation master file, created by
.. python_lib_quickstart documentation master file, created by
sphinx-quickstart on Mon Aug 2 09:58:09 2021.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to pylib_quick documentation!
Welcome to python_lib_quickstart documentation!
=======================================

In this documentation detail of the functions are given.
Expand Down
2 changes: 0 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ channels:
dependencies:
- python=3.11
- pip
- pip :
- sphinx-rtd-theme
File renamed without changes.
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
from setuptools import find_packages, setup, Command

# Package meta-data.
NAME = 'pylib_quick'
DESCRIPTION = 'python package'
URL = 'https://gricad-gitlab.univ-grenoble-alpes.fr/quicktools/pylib_quick'
NAME = 'python_lib_quickstart'
DESCRIPTION = 'python library packaging example'
URL = 'https://github.com/ige-calcul/python_lib_quickstart'
EMAIL = '[email protected]'
AUTHOR = 'Thomas Chauve'
REQUIRES_PYTHON = '>=3.11'
VERSION = '0.2'
VERSION = '0.3'

# What packages are required for this module to be executed?
REQUIRED = [
Expand Down

0 comments on commit 923e19c

Please sign in to comment.