From 6e5cfc30012cdf9c3b0f5370f2029af546a17996 Mon Sep 17 00:00:00 2001 From: Mark Bonicillo Date: Mon, 15 May 2023 17:47:47 -0700 Subject: [PATCH] Add GH workflow for documentation, fix ci script --- .github/workflows/documentation.yml | 25 +++++++++++++++++++++++++ .nojekyll | 0 .pre-commit-config.yaml | 2 -- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/documentation.yml create mode 100644 .nojekyll diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 00000000..b79bdaab --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,25 @@ +name: Docs +on: [push, pull_request, workflow_dispatch] +permissions: + contents: write +jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + - name: Install dependencies + run: | + pip install sphinx sphinx_rtd_theme + pip install -r docs/requirements.txt + pip install .'[documentation]' + - name: Sphinx build + run: | + sphinx-build docs/source _build + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + publish_branch: gh-pages + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: _build/ + force_orphan: true diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2bb5c4a3..f826e7e0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,8 +13,6 @@ repos: - id: trailing-whitespace exclude: ^(docs/|hypernetx.egg-info/|setup.cfg) - id: check-merge-conflict - - id: no-commit-to-branch - args: ['--branch', 'master'] # blocks master commits. To bypass do git commit --allow-empty - repo: https://github.com/psf/black rev: 22.6.0