Skip to content

Commit

Permalink
Make github action for sphinx docs (#26)
Browse files Browse the repository at this point in the history
* make sphinx.yml workflow and edit for github actions

* add .md support for source_suffix

---------

Co-authored-by: jeffrey <[email protected]>
  • Loading branch information
vkehfdl1 and jeffrey authored Jan 17, 2024
1 parent 361fe39 commit 3ae4b68
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 7 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Sphinx build

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build HTML
uses: ammaraskar/[email protected]
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: html-docs
path: docs/build/html/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html
6 changes: 0 additions & 6 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
pytest
pytest-env
sphinx
furo
twine
build
setuptools-scm
myst-parser
sphinx-inline-tabs
sphinx-copybutton
sphinx_design
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SPHINXBUILD += sphinx-build
SOURCEDIR = source
BUILDDIR = build

Expand Down
6 changes: 6 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sphinx
furo
myst-parser
sphinx-inline-tabs
sphinx-copybutton
sphinx_design
4 changes: 4 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
"sphinx_design",
"sphinx_inline_tabs",
]
source_suffix = {
'.rst': 'restructuredtext',
'.md': 'markdown',
}

templates_path = ['_templates']
exclude_patterns = []
Expand Down

0 comments on commit 3ae4b68

Please sign in to comment.