Skip to content

Commit

Permalink
enhance doc
Browse files Browse the repository at this point in the history
  • Loading branch information
brash6 committed Apr 9, 2024
1 parent 6a9eb17 commit 5bf58fe
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 21 deletions.
48 changes: 28 additions & 20 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,34 @@ name: documentation

on: [push, pull_request, workflow_dispatch]

permissions:
contents: write

jobs:
docs:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- name: Install dependencies
run: |
pip install sphinx sphinx_rtd_theme myst_parser
- name: Sphinx build
run: |
sphinx-build docs _build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
publish_branch: documentation_page
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true
python-version: "3.10"
# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ghp-import sphinx sphinx_rtd_theme
- name: Build HTML
run: |
cd docs/
make html
- name: Run ghp-import
run: |
ghp-import -n -p -f docs/_build/html
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'alabaster'
html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']

0 comments on commit 5bf58fe

Please sign in to comment.