From d16c01c2f24e5aff5f68255c709d7e9bb0e71381 Mon Sep 17 00:00:00 2001 From: Samuel Rince Date: Thu, 18 Apr 2024 14:08:27 +0200 Subject: [PATCH] ci: add github pages --- .github/workflows/publish-docs.yaml | 43 +++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/publish-docs.yaml diff --git a/.github/workflows/publish-docs.yaml b/.github/workflows/publish-docs.yaml new file mode 100644 index 0000000..77c1b8a --- /dev/null +++ b/.github/workflows/publish-docs.yaml @@ -0,0 +1,43 @@ +name: publish-docs + +on: + push: + branches: + - ci/publish-pypi + +permissions: + contents: write + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + # check-out repo and set-up python + - name: Check out repository + uses: actions/checkout@v4 + - name: Configure Git Credentials + run: | + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + - name: Set up python + id: setup-python + uses: actions/setup-python@v5 + with: + python-version: "3.9" + + # install & configure poetry + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + virtualenvs-create: true + virtualenvs-in-project: true + installer-parallel: true + + # install dependencies if cache does not exist + - name: Install dependencies + if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' + run: poetry install --no-interaction --only docs + + # deploy github pages + - name: Deploy GitHub Pages + run: mkdocs gh-deploy --force