Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions docs/commandline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,36 @@
:prog: doctr


Deployment Procedure
--------------------

Starting from a checkout of a white-listed branch on Travis, with the
documentation having been built successfully, ``doctr deploy`` takes the
following steps:

* copy the ``BUILT_DOCS`` directory to a temporary location
* stash the current checkout
* check out the ``DEPLOY_BRANCH_NAME`` (default ``gh-pages``) on the
``DEPLOY_REPO`` (current repo, by default)
* "Synchronize":
- if there is a file ``.doctr-files`` in the ``deploy_directory``, remove all
files listed therein (excluding ``EXCLUDE``)
- copy all files from the (copied) ``BUILT_DOCS`` directory to the
``deploy_directory`` (excluding ``EXCLUDE``)
- create a new ``.doctr-files`` log that contains all files of the previous
``.doctr-files``, minus those removed, plus those added. That is, a list
of all files in the ``deploy_directory`` that exist due to ``doctr``
* run ``COMMAND`` if ``--command`` was given
* run ``git add`` for any files that were added during synchronization, and
``git rm`` for any files that were removed
* commit and push the ``DEPLOY_BRANCH_NAME``
* switch back to the original checkout and un-stash

As a result of the above procedure, if ``COMMAND`` creates any new files that
were not present during the synchronization, it must ``git add`` those
files for them to be committed later.


Configuration
-------------

Expand Down