From d729445039325995916fe05eaa3929085a678288 Mon Sep 17 00:00:00 2001 From: Rostyslav Zatserkovnyi Date: Wed, 16 Oct 2024 17:22:19 +0300 Subject: [PATCH 1/3] Add GH Pages workflow --- .github/workflows/documentation.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/documentation.yml diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 0000000..91844a5 --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,29 @@ +name: documentation + +on: [push, pull_request, workflow_dispatch] + +permissions: + contents: write + +jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - name: Install dependencies + run: | + python3.8 -m venv .venv + .venv/bin/python -m pip install --upgrade pip + .venv/bin/pip install -e ".[dev]" + - uses: siacodelabs/setup-pandoc@v1 + - name: Sphinx build + run: | + .venv/bin/sphinx-build -b html docs docs/_build + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + publish_branch: gh-pages + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/_build/ + force_orphan: true \ No newline at end of file From 2eb86e7f2dbf2ec05ce84a23a0bae5b8441c465b Mon Sep 17 00:00:00 2001 From: Rostyslav Zatserkovnyi Date: Wed, 16 Oct 2024 17:32:50 +0300 Subject: [PATCH 2/3] Restrict to main --- .github/workflows/documentation.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 91844a5..9416c64 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -1,6 +1,9 @@ name: documentation -on: [push, pull_request, workflow_dispatch] +on: + push: + branches: + - main permissions: contents: write From 71cfa5696665c3b611e9025b18cc4177d7025573 Mon Sep 17 00:00:00 2001 From: Rostyslav Zatserkovnyi Date: Wed, 16 Oct 2024 17:33:17 +0300 Subject: [PATCH 3/3] Newline --- .github/workflows/documentation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 9416c64..f2e584a 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -29,4 +29,4 @@ jobs: publish_branch: gh-pages github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: docs/_build/ - force_orphan: true \ No newline at end of file + force_orphan: true