Skip to content

Commit

Permalink
chore: Template upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Apr 26, 2023
1 parent 7d2cbca commit 2822fb9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: 0.13.4
_commit: 0.14.0
_src_path: gh:pawamoy/copier-pdm
author_email: pawamoy@pm.me
author_fullname: Timothée Mazzucotelli
Expand Down
17 changes: 16 additions & 1 deletion duties.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,22 @@ def docs_deploy(ctx: Context) -> None:
ctx: The context instance (passed automatically).
"""
os.environ["DEPLOY"] = "true"
ctx.run(mkdocs.gh_deploy(config_file=mkdocs_config()), title="Deploying documentation")
config_file = mkdocs_config()
if config_file == "mkdocs.yml":
ctx.run(lambda: False, title="Not deploying docs without Material for MkDocs Insiders!")
origin = ctx.run("git config --get remote.origin.url", silent=True)
if "pawamoy-insiders/markdown-exec" in origin:
ctx.run("git remote add upstream git@github.com:pawamoy/markdown-exec", silent=True, nofail=True)
ctx.run(
mkdocs.gh_deploy(config_file=config_file, remote_name="upstream", force=True),
title="Deploying documentation",
)
else:
ctx.run(
lambda: False,
title="Not deploying docs from public repository (do that from insiders instead!)",
nofail=True,
)


@duty
Expand Down

0 comments on commit 2822fb9

Please sign in to comment.