From 9344042be6b823555941069a641fdb7252226a6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Perceval=20Wajsb=C3=BCrt?= Date: Fri, 15 Sep 2023 10:55:20 +0200 Subject: [PATCH] docs: auto update dev docs & minify files --- .github/workflows/documentation.yml | 9 ++++++--- docs/index.md | 2 +- mkdocs.yml | 7 +++++++ pyproject.toml | 1 + 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 13108923b..819a4d9c5 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -2,7 +2,10 @@ name: Documentation on: push: - branches: [master] + branches: [master, dev] + +env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} jobs: Documentation: @@ -21,5 +24,5 @@ jobs: - name: Build documentation run: | git fetch origin gh-pages - mike delete master - mike deploy --push master + mike delete $BRANCH_NAME + mike deploy --push $BRANCH_NAME diff --git a/docs/index.md b/docs/index.md index 3c883f305..5e2e595c3 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -# Getting started +# Getting started okokok EDS-NLP provides a set of spaCy components that are used to extract information from clinical notes written in French. diff --git a/mkdocs.yml b/mkdocs.yml index e34b2c798..2c31b4dbe 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -171,6 +171,13 @@ hooks: plugins: - search + - minify: + minify_html: true + minify_js: true + minify_css: true + htmlmin_opts: + remove_comments: true + cache_safe: true - autorefs: priority: - .* diff --git a/pyproject.toml b/pyproject.toml index 5147a8c2b..b6801d487 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,6 +51,7 @@ dev = [ "mkdocs~=1.5.2", "mkdocstrings~=0.20", "mkdocstrings-python~=1.1", + "mkdocs-minify-plugin", "pybtex~=0.24.0", "pathspec>=0.11.1", # required by vendored mkdocs-autorefs PR "astunparse",