From 5500bdcad7e1dfa43631fc2f2eceb405e3f594a5 Mon Sep 17 00:00:00 2001 From: Nathan Nowack Date: Sun, 10 Dec 2023 17:13:18 -0600 Subject: [PATCH] try to add mike --- .github/workflows/publish-docs.yml | 18 ++++++++++++++---- docs/static/css/tailwind.css | 10 ++++++---- mkdocs.yml | 4 +++- pyproject.toml | 1 + 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 5ecf2f10d..6063e1739 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -3,6 +3,8 @@ name: Publish Docs on: push: branches: ["main"] + tags: + - 'v*' workflow_dispatch: env: @@ -11,6 +13,7 @@ env: permissions: contents: write + jobs: publish-docs: runs-on: ubuntu-latest @@ -23,7 +26,6 @@ jobs: with: key: ${{ github.ref }} path: .cache - # for now, only install mkdocs. In the future may need to install Marvin itself. - name: Install dependencies for MKDocs Material run: pip install \ mkdocs-material \ @@ -33,6 +35,14 @@ jobs: mkdocs-markdownextradata-plugin \ mkdocs-jupyter \ pillow \ - cairosvg - - name: Publish docs - run: mkdocs gh-deploy --force + cairosvg \ + mike + - name: Publish docs from `main` to dev + if: github.ref == 'refs/heads/main' + run: mike deploy dev --push --update-aliases + + - name: Publish versioned docs + if: startsWith(github.ref, 'refs/tags/v') + run: | + VERSION=$(echo $GITHUB_REF | sed 's/refs\/tags\/v//') + mike deploy $VERSION latest --push --update-aliases diff --git a/docs/static/css/tailwind.css b/docs/static/css/tailwind.css index 2c4022e89..4def5c0e9 100644 --- a/docs/static/css/tailwind.css +++ b/docs/static/css/tailwind.css @@ -1,5 +1,5 @@ /* -! tailwindcss v3.3.3 | MIT License | https://tailwindcss.com +! tailwindcss v3.3.6 | MIT License | https://tailwindcss.com */ /* @@ -121,8 +121,10 @@ strong { } /* -1. Use the user's configured `mono` font family by default. -2. Correct the odd `em` font sizing in all browsers. +1. Use the user's configured `mono` font-family by default. +2. Use the user's configured `mono` font-feature-settings by default. +3. Use the user's configured `mono` font-variation-settings by default. +4. Correct the odd `em` font sizing in all browsers. */ code, @@ -132,7 +134,7 @@ pre { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */ font-size: 1em; - /* 2 */ + /* 4 */ } /* diff --git a/mkdocs.yml b/mkdocs.yml index f734d7696..d2a88a89b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -151,7 +151,9 @@ extra: link: https://discord.gg/Kgw4HpcuYG - icon: fontawesome/brands/twitter link: https://twitter.com/askmarvinai - + version: + mike: + canonical_version: latest extra_css: - /static/css/global.css diff --git a/pyproject.toml b/pyproject.toml index 0a0f28444..8fc753372 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,6 +31,7 @@ dev = [ "marvin[tests]", "black[jupyter]", "ipython", + "mike @ git+https://github.com/jimporter/mike.git", "mkdocs-autolinks-plugin~=0.7", "mkdocs-awesome-pages-plugin~=2.8", "mkdocs-markdownextradata-plugin~=0.2",