|
6 | 6 | :prog: doctr |
7 | 7 |
|
8 | 8 |
|
| 9 | +Deployment Procedure |
| 10 | +-------------------- |
| 11 | + |
| 12 | +Starting from a checkout of a white-listed branch on Travis, with the |
| 13 | +documentation having been built successfully, ``doctr deploy`` takes the |
| 14 | +following steps: |
| 15 | + |
| 16 | +* copy the ``BUILT_DOCS`` directory to a temporary location |
| 17 | +* stash the current checkout |
| 18 | +* check out the ``DEPLOY_BRANCH_NAME`` (default ``gh-pages``) on the |
| 19 | + ``DEPLOY_REPO`` (current repo, by default) |
| 20 | +* "Synchronize": |
| 21 | + - if there is a file ``.doctr-files`` in the ``deploy_directory``, remove all |
| 22 | + files listed therein (excluding ``EXCLUDE``) |
| 23 | + - copy all files from the (copied) ``BUILT_DOCS`` directory to the |
| 24 | + ``deploy_directory`` (excluding ``EXCLUDE``) |
| 25 | + - create a new ``.doctr-files`` log that contains all files of the previous |
| 26 | + ``.doctr-files``, minus those removed, plus those added. That is, a list |
| 27 | + of all files in the ``deploy_directory`` that exist due to ``doctr`` |
| 28 | +* run ``COMMAND`` if ``--command`` was given |
| 29 | +* run ``git add`` for any files that were added during synchronization, and |
| 30 | + ``git rm`` for any files that were removed |
| 31 | +* commit and push the ``DEPLOY_BRANCH_NAME`` |
| 32 | +* switch back to the original checkout and un-stash |
| 33 | + |
| 34 | +As a result of the above procedure, if ``COMMAND`` creates any new files that |
| 35 | +were not present during the synchronization, it must ``git add`` those |
| 36 | +files for them to be committed later. |
| 37 | + |
| 38 | + |
9 | 39 | Configuration |
10 | 40 | ------------- |
11 | 41 |
|
|
0 commit comments