From 27c1f736e5d5317633f190fe597be314fcd15668 Mon Sep 17 00:00:00 2001 From: madanucd Date: Mon, 17 Jun 2024 17:00:20 -0400 Subject: [PATCH] excluding previous versions implementation --- .github/workflows/deploy-docs.yaml | 3 ++- Makefile | 30 ++---------------------------- mkdocs.yml | 4 +--- 3 files changed, 5 insertions(+), 32 deletions(-) diff --git a/.github/workflows/deploy-docs.yaml b/.github/workflows/deploy-docs.yaml index 4517f94..590ec65 100644 --- a/.github/workflows/deploy-docs.yaml +++ b/.github/workflows/deploy-docs.yaml @@ -27,5 +27,6 @@ jobs: run: | mkdir -p docs touch docs/.nojekyll - make gendoc + cp src/docs/*md docs + poetry run gen-doc -d docs --template-directory src/doc_templates src/linkml/include_schema.yaml poetry run mkdocs gh-deploy \ No newline at end of file diff --git a/Makefile b/Makefile index 2815318..ba8c05e 100644 --- a/Makefile +++ b/Makefile @@ -81,35 +81,9 @@ $(PYMODEL): $(DOCDIR): mkdir -p $@ -#gendoc: $(DOCDIR) -# cp $(SRC)/docs/*md $(DOCDIR) ; \ -# $(RUN) gen-doc -d $(DOCDIR) --template-directory $(SRC)/$(TEMPLATEDIR) $(SOURCE_SCHEMA_PATH) - -update-docs: - cp $(SRC)/docs/about.md $(DOCDIR)/about.md - @echo "Updated docs/about.md from src/docs/about.md" - -# Include update-docs target in gendoc target gendoc: $(DOCDIR) - @initial_branch=$$(git branch --show-current); \ - latest_version=$$(git tag | sort -V | tail -n 1); \ - for version in $$(git tag | sort -V); do \ - if [ "$$version" = "$$latest_version" ]; then \ - echo "Generating documentation for the current version: $$version"; \ - git checkout $$version; \ - $(RUN) gen-doc -d $(DOCDIR) --template-directory $(SRC)/$(TEMPLATEDIR) $(SOURCE_SCHEMA_PATH); \ - cp $(SRC)/docs/*md $(DOCDIR); \ - elif [ ! -d $(DOCDIR)/$$version ]; then \ - echo "Generating documentation for version: $$version"; \ - git checkout $$version; \ - $(RUN) gen-doc -d $(DOCDIR)/$$version --template-directory $(SRC)/$(TEMPLATEDIR) $(SOURCE_SCHEMA_PATH); \ - cp $(SRC)/docs/*md $(DOCDIR)/$$version; \ - else \ - echo "Documentation for $$version already exists, skipping."; \ - fi; \ - done; \ - git checkout $$initial_branch - update-docs + cp $(SRC)/docs/*md $(DOCDIR) ; \ + $(RUN) gen-doc -d $(DOCDIR) --template-directory $(SRC)/$(TEMPLATEDIR) $(SOURCE_SCHEMA_PATH) testdoc: gendoc serve diff --git a/mkdocs.yml b/mkdocs.yml index 1ad7f75..0ed9970 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -26,8 +26,6 @@ plugins: nav: - Index: index.md - About: about.md - - Previous Releases: - - Version 2.2.0: v2.2.0/index.md - - Version 2.1.0: v2.1.0/index.md + site_url: https://include-dcc.github.io/include-linkml/ repo_url: https://github.com/include-dcc/include-linkml/