From 0d86a983a7c2b4ca732bd5709d430dac8d5d8389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Mon, 8 Jul 2024 23:59:26 +0200 Subject: [PATCH] Revert "chore: Allow deploying from main repo" This reverts commit fcd33080db4e78c5adea983e826bc8b5cc57ce30. --- duties.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/duties.py b/duties.py index 4a2b922..d0c3187 100644 --- a/duties.py +++ b/duties.py @@ -125,10 +125,19 @@ def docs_deploy(ctx: Context) -> None: with material_insiders() as insiders: if not insiders: ctx.run(lambda: False, title="Not deploying docs without Material for MkDocs Insiders!") - ctx.run( - tools.mkdocs.gh_deploy(force=True), - title="Deploying documentation", - ) + origin = ctx.run("git config --get remote.origin.url", silent=True, allow_overrides=False) + 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( + tools.mkdocs.gh_deploy(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