Skip to content

Make the gh_deploy command and support multiple targets (i.e. PyPI) #431

Open

Description

@d0ugal

We should think about a general deploy command.

mkdocs deploy github
mkdocs deploy pypi

Activity

  1. changed the title [-]Support cheeseshop docs hosting[/-] [+]Support PyPI/cheeseshop docs hosting[/+] on Apr 24, 2015
  2. lovelydinosaur commented on Jun 25, 2015

    @lovelydinosaur
    Collaborator

    Seconded. Was considering the same.
    Alternative:

    `mkdocs deploy`
    

    With the deployment list in the mkdocs.yaml, and with github as the default.
    Further future (not worth a ticket yet) we could have this extensible via plugins.

  3. added this to the Post 1.0 milestone on Jun 27, 2015
  4. changed the title [-]Support PyPI/cheeseshop docs hosting[/-] [+]Make the gh_deploy command and support multiple targets (i.e. PyPI)[/+] on Jul 2, 2015
  5. wilhelmer commented on Jun 5, 2019

    @wilhelmer
    Contributor

    The mkdocs gh-deploy command can also be used without GitHub Pages, i.e., to simply build the site and push the site_dir contents to a branch of your choice, e.g., mkdocs gh-deploy -b my_branch.

    This even works if the repo isn't a GitHub repo! The contents will then be pushed to a local branch.

    My only issues with this are

    • that the command name is a bit misleading if you don't use GitHub or GH Pages
    • info messages are displayed stating "... pushing to GitHub" and "Your site should be available on xy.github.io/abc shortly", which isn't true if I don't use GH.

    So maybe simply renaming the existing command to mkdocs deploy and editing the info messages would be enough?

  6. waylan commented on Jun 5, 2019

    @waylan
    Contributor

    @wilhelmer the existing command is a light wrapper around a vendored (and slightly modified) copy of the GitHub Pages Import script. That script is specifically designed for GitHub Pages and outputs the messages which specifically name "GitHub." As we intend to only maintain our own modified copy until c-w/ghp-import#69 is accepted and released, making additional modifications to the vendored script doesn't really make sense.

    That said, you make some valid points. My proposal for this issue is to create a new command deploy, which contains a list of subcommands, each of which is supplied by a plugin. That way, various third-party plugins could be created to handle all sorts of different deployment scenarios. A "deploy to git" plugin certainly seems like a great candidate, among others.

  7. wilhelmer commented on Jun 5, 2019

    @wilhelmer
    Contributor

    Great. My only wish is that the "deploy to git" plugin is available right from the start so we won't lose the current functionality (which may only be an unintended side effect but is still super useful).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions