From 2bf22f6795237f589b0366728bc407d9a1ab103b Mon Sep 17 00:00:00 2001 From: Kyle Barron Date: Tue, 17 Oct 2023 16:26:05 -0400 Subject: [PATCH] publish docs on ci (#122) --- .github/workflows/deploy-mkdocs.yml | 44 +++++++++++++++++++++++++++++ .yarnrc.yml | 1 - mkdocs.yml | 2 +- 3 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/deploy-mkdocs.yml delete mode 100644 .yarnrc.yml diff --git a/.github/workflows/deploy-mkdocs.yml b/.github/workflows/deploy-mkdocs.yml new file mode 100644 index 00000000..6c58d941 --- /dev/null +++ b/.github/workflows/deploy-mkdocs.yml @@ -0,0 +1,44 @@ +name: Publish docs via GitHub Pages + +on: + push: + branches: + - main + +jobs: + build: + name: Deploy docs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python 3.11 + id: setup-python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + + - name: Install and configure Poetry + uses: snok/install-poetry@v1 + with: + version: 1.6.1 + virtualenvs-create: true + virtualenvs-in-project: true + installer-parallel: true + + - name: Load cached venv + id: cached-poetry-dependencies + uses: actions/cache@v3 + with: + path: .venv + key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} + + - name: Install dependencies + if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' + run: poetry install --no-interaction --no-root + + - name: Install root project + run: poetry install --no-interaction + + - name: Deploy docs + run: mkdocs gh-deploy --force diff --git a/.yarnrc.yml b/.yarnrc.yml deleted file mode 100644 index 3186f3f0..00000000 --- a/.yarnrc.yml +++ /dev/null @@ -1 +0,0 @@ -nodeLinker: node-modules diff --git a/mkdocs.yml b/mkdocs.yml index 5bc89fdb..2fd1e0c4 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -27,7 +27,7 @@ nav: - API Reference: - api/top-level.md - api/colormap.md - - Caveats: caveats.md + # - Caveats: caveats.md - Performance: performance.md - Alternatives: alternatives.md - "How it works?": how-it-works.md