Skip to content

Testing github action for docs build #766

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: MSTICPy Docs build

on:
push:
branches: [main]
pull_request:
branches: [main, release/*]

jobs:
docs:
runs-on: ubuntu-latest
permissions: read-all
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v3
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-docs-${{ hashFiles('docs/requirements-all.txt') }}
restore-keys: |
${{ runner.os }}-pip-docs-${{ hashFiles('docs/requirements-all.txt') }}
${{ runner.os }}-pip-docs
${{ runner.os }}-pip
- name: Sphinx Read the Docs build
working-directory: docs
run: |
echo "Building docs from ${{ github.workspace }}/docs"
python -m pip install sphinx readthedocs-sphinx-ext>=2.1.4 sphinx-rtd-theme>=1.0.0
python -m pip install -r ${{ github.workspace }}/docs/requirements.txt
make html
env:
SPHINX_NOGEN: "true"