Skip to content

Add option to transfer post-processing scripts #353

@goerz

Description

@goerz

I have a folder that contains a python script that I want to use for post-processing (doctr deploy --command ...), along with python modules that the script depends on. Since doctr runs the --command from within the deploy branch (gh-pages), that folder has to be available in doctr's checkout of gh-pages. However, I'd very much like to keep the folder on my master branch, not gh-pages, for a number of reasons:

  • Chicken-and-egg problem: I can't set up doctr on a new repo that doesn't have a gh-pages branch yet: I'd have to create gh-pages manually and place the post-processing script in it
  • The code for building the docs shouldn't be separated across different branches: the build-commands in my .travis.yml and the post-processing script are very much interdependent, so for any changes to the doc-building process I'd have to work simultaneously in two different branches of the project
  • A contributor to the project (or myself after a couple of months, having forgotten the details of doctr) might be confused about where to find the post-processing script, and would probably not think to look on the gh-pages branch.
  • Philosophically, I think of gh-pages as a "deployment branch" that I don't want to have to touch by hand.

I would propose to add e.g. a --transfer flag to the doctr command that would transfer files/folders from the build-branch (master/version-tag) to the deploy branch (gh-pages). The transferred files/folders should not be commited to gh-pages.

For the time being, I'm trying to work around this by copying the folder containing the post-processing script (.travis) to the deploy directory (cp -r .travis docs/build/html/_doctr) in my .travis.yml before the call to doctr deploy. However, I'm having a very hard time preventing the _doctr directory from being pushed to gh-pages. Isn't that what --exclude _doctr should do?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions