Skip to content

Commit

Permalink
Remove epub generation for docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ScriptAutomate authored and dwoz committed Aug 8, 2024
1 parent 53ddf5a commit c222b6e
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 105 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
- linkcheck
- spellcheck
- html
- epub
# - pdf

steps:
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/templates/staging.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 1 addition & 7 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 <target>' where <target> is one of"
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions doc/_themes/saltstack2/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,8 @@

{% if not (build_type == repo_primary_branch or build_type == "next") and on_saltstack %}
<li><a class="icon-dl" href="/en/pdf/Salt-{{ release }}.pdf"><img height="25" width="25" class="nolightbox" src="{{ pathto('_static/images/pdf_icon.svg', 1) }}"></a></li>
<li><a class="icon-dl" href="/en/epub/Salt-{{ release }}.epub"><img height="25" width="18" class="nolightbox" src="{{ pathto('_static/images/epub_icon.svg', 1) }}"></a></li>
{% elif build_type == repo_primary_branch and on_saltstack %}
<li><a class="icon-dl" href="/en/pdf/Salt-{{ repo_primary_branch }}.pdf"><img height="25" width="25" class="nolightbox" src="{{ pathto('_static/images/pdf_icon.svg', 1) }}"></a></li>
<li><a class="icon-dl" href="/en/epub/Salt-{{ repo_primary_branch }}.epub"><img height="25" width="18" class="nolightbox" src="{{ pathto('_static/images/epub_icon.svg', 1) }}"></a></li>
{% endif %}
</ul>
</nav>
Expand Down
25 changes: 0 additions & 25 deletions doc/_themes/saltstack2/static/images/epub_icon.svg

This file was deleted.

13 changes: 0 additions & 13 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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("_"):
Expand Down
45 changes: 0 additions & 45 deletions tools/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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={
Expand Down

0 comments on commit c222b6e

Please sign in to comment.