Skip to content

Commit

Permalink
chore: Allow deploying from main repo
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Jun 13, 2024
1 parent e458ffc commit fcd3308
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions duties.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,19 +125,10 @@ 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!")
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 [email protected]: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,
)
ctx.run(
tools.mkdocs.gh_deploy(),
title="Deploying documentation",
)


@duty
Expand Down

0 comments on commit fcd3308

Please sign in to comment.