From c222b6e9783778fb11493f2278392b7f4815137e Mon Sep 17 00:00:00 2001 From: ScriptAutomate Date: Tue, 30 Jul 2024 14:49:42 -0500 Subject: [PATCH] Remove epub generation for docs --- .github/workflows/build-docs.yml | 1 - .github/workflows/staging.yml | 6 --- .github/workflows/templates/staging.yml.jinja | 6 --- doc/Makefile | 8 +--- doc/_themes/saltstack2/layout.html | 2 - .../saltstack2/static/images/epub_icon.svg | 25 ----------- doc/conf.py | 13 ------ tools/docs.py | 45 ------------------- 8 files changed, 1 insertion(+), 105 deletions(-) delete mode 100644 doc/_themes/saltstack2/static/images/epub_icon.svg diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index adeeb2fff67d..a4544923cc21 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -32,7 +32,6 @@ jobs: - linkcheck - spellcheck - html - - epub # - pdf steps: diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 1313812f8edb..616582c55eca 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -2847,12 +2847,6 @@ jobs: name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-docs-html.tar.xz path: artifacts/release - - name: Download Release Documentation (ePub) - uses: actions/download-artifact@v4 - with: - name: Salt-${{ needs.prepare-workflow.outputs.salt-version }}.epub - path: artifacts/release - - name: Show Release Artifacts run: | tree -a artifacts/release diff --git a/.github/workflows/templates/staging.yml.jinja b/.github/workflows/templates/staging.yml.jinja index ae096e51e356..a15302bc00ad 100644 --- a/.github/workflows/templates/staging.yml.jinja +++ b/.github/workflows/templates/staging.yml.jinja @@ -124,12 +124,6 @@ concurrency: name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-docs-html.tar.xz path: artifacts/release - - name: Download Release Documentation (ePub) - uses: actions/download-artifact@v4 - with: - name: Salt-${{ needs.prepare-workflow.outputs.salt-version }}.epub - path: artifacts/release - - name: Show Release Artifacts run: | tree -a artifacts/release diff --git a/doc/Makefile b/doc/Makefile index 9b1b1939a9bd..60d95e24e811 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -16,7 +16,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -.PHONY: help clean check_sphinx-build html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest +.PHONY: help clean check_sphinx-build html dirhtml singlehtml pickle json htmlhelp qthelp devhelp latex latexpdf text man changes linkcheck doctest help: @echo "Please use \`make ' where is one of" @@ -28,7 +28,6 @@ help: @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " pdf to make Salt-all.pdf and splitted pdf using xelatex" @echo " cheatsheet to create salt-cheatsheet.pdf" @@ -101,11 +100,6 @@ devhelp: check_sphinx-build @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Salt" @echo "# devhelp" -epub: check_sphinx-build - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - latex: check_sphinx-build $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo diff --git a/doc/_themes/saltstack2/layout.html b/doc/_themes/saltstack2/layout.html index 32fff3e60952..f98ae192d7c7 100644 --- a/doc/_themes/saltstack2/layout.html +++ b/doc/_themes/saltstack2/layout.html @@ -193,10 +193,8 @@ {% if not (build_type == repo_primary_branch or build_type == "next") and on_saltstack %}
  • -
  • {% elif build_type == repo_primary_branch and on_saltstack %}
  • -
  • {% endif %} diff --git a/doc/_themes/saltstack2/static/images/epub_icon.svg b/doc/_themes/saltstack2/static/images/epub_icon.svg deleted file mode 100644 index e50861b8d3c8..000000000000 --- a/doc/_themes/saltstack2/static/images/epub_icon.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - diff --git a/doc/conf.py b/doc/conf.py index 2b60d5b0a4e4..33503d70e25b 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -383,19 +383,6 @@ ] -### epub options -epub_title = "Salt Documentation" -epub_author = "VMware, Inc." -epub_publisher = epub_author -epub_copyright = copyright - -epub_scheme = "URL" -epub_identifier = "http://saltproject.io/" - -epub_tocdup = False -# epub_tocdepth = 3 - - def skip_mod_init_member(app, what, name, obj, skip, options): # pylint: disable=too-many-arguments,unused-argument if name.startswith("_"): diff --git a/tools/docs.py b/tools/docs.py index 6e5ad281c12a..c0d19afdd6ff 100644 --- a/tools/docs.py +++ b/tools/docs.py @@ -133,51 +133,6 @@ def html( ) -@docs.command( - name="epub", - arguments={ - "no_clean": { - "help": "Don't cleanup prior to building", - }, - "no_color": { - "help": "Disable colored output.", - }, - }, -) -def epub(ctx: Context, no_clean: bool = False, no_color: bool = False): - if no_clean is False: - ctx.run("make", "clean", cwd="doc/", check=True) - opts = [ - "-j", - "auto", - "--keep-going", - ] - if no_color is False: - opts.append("--color") - ctx.run( - "make", - "epub", - f"SPHINXOPTS={' '.join(opts)}", - cwd="doc/", - check=True, - ) - - artifact = tools.utils.REPO_ROOT / "doc" / "_build" / "epub" / "Salt.epub" - if "LATEST_RELEASE" in os.environ: - shutil.move( - artifact, artifact.parent / f"Salt-{os.environ['LATEST_RELEASE']}.epub" - ) - artifact = artifact.parent / f"Salt-{os.environ['LATEST_RELEASE']}.epub" - github_output = os.environ.get("GITHUB_OUTPUT") - if github_output is not None: - with open(github_output, "a", encoding="utf-8") as wfh: - wfh.write( - "has-artifacts=true\n" - f"artifact-name={artifact.resolve().name}\n" - f"artifact-path={artifact.resolve()}\n" - ) - - @docs.command( name="pdf", arguments={