From ce4c89bb739be99d701a7fdb3d3d291304d8bba5 Mon Sep 17 00:00:00 2001 From: gnikit Date: Sun, 14 Apr 2024 19:51:20 +0100 Subject: [PATCH] feat: Add GitHub Actions workflow for previewing documentation --- .github/workflows/docs_preview.yml | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/docs_preview.yml diff --git a/.github/workflows/docs_preview.yml b/.github/workflows/docs_preview.yml new file mode 100644 index 00000000..1ce4c77b --- /dev/null +++ b/.github/workflows/docs_preview.yml @@ -0,0 +1,34 @@ +name: Docs Preview + +permissions: + pull-requests: write + +on: + pull_request: + types: + - opened + - synchronize + - reopened + - edited + - closed + paths: + - "docs/**" + - "fortls/interface.py" + workflow_dispatch: + +concurrency: preview-${{github.ref}} + +jobs: + deploy-preview: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: sphinx-toolbox/sphinx-action@master + with: + pre-build-command: "pip install .[docs]" + docs-folder: "docs/" + - name: Deploy Preview + uses: rossjrw/pr-preview-action@v1.4.7 + with: + source-dir: docs/_build/html + preview-branch: gh-pages