Skip to content

Commit f72db87

Browse files
committed
Setup docs build workflow
1 parent 1d35883 commit f72db87

2 files changed

Lines changed: 60 additions & 0 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# This pipeline
2+
# - builds developer documentation
3+
# - pushes documentation to gh-pages branch of the same repository
4+
#
5+
# Deployment is handled by pages-build-deployment bot
6+
#
7+
# For more information see: https://docs.github.com/en/pages/getting-started-with-github-pages
8+
9+
name: Build Documentation and Push to gh-pages Branch
10+
11+
# Controls when the workflow will run
12+
on:
13+
# Triggers the workflow on tag creation
14+
push:
15+
tags:
16+
- 'v*'
17+
18+
# Allows you to run this workflow manually from the Actions tab
19+
workflow_dispatch:
20+
21+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
22+
jobs:
23+
# This workflow contains a single job called "build"
24+
build_documentation:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@master
29+
with:
30+
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
31+
- name: Upgrade pip
32+
run: |
33+
python -m pip install --upgrade pip
34+
- name: Set up Python
35+
uses: actions/setup-python@v5
36+
with:
37+
python-version: 3.11
38+
- name: Install Pandoc, repo and dependencies
39+
run: |
40+
sudo apt install pandoc
41+
pip install . '.[docs]'
42+
- name: Build and Commit
43+
uses: sphinx-notes/pages@master
44+
with:
45+
install_requirements: true
46+
documentation_path: docs/src
47+
- name: Push changes
48+
uses: ad-m/github-push-action@master
49+
continue-on-error: true
50+
with:
51+
branch: gh-pages

pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ ci = [
4242
'dephell_licenses'
4343
]
4444

45+
docs = [
46+
"myst_parser==4.0.1",
47+
"nbsphinx==0.9.7",
48+
"sphinx_autodoc_typehints==3.0.1",
49+
"sphinx_book_theme==1.1.4",
50+
"sphinx-copybutton==0.5.2",
51+
"toml==0.10.2",
52+
]
53+
4554
[release]
4655
app_name = 'EasyReflectometryApp'
4756
family_name = 'EasyReflectometryApp'

0 commit comments

Comments
 (0)