Skip to content

Commit 2300533

Browse files
committed
Document the deployment procedure
This should clarify some of the details mentioned in the `doctr deploy` documentation, specifically what "synchronization" is (`--no-sync` flag), and how `--command` fits in.
1 parent 0f19ff7 commit 2300533

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

docs/commandline.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,36 @@
66
:prog: doctr
77

88

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+
939
Configuration
1040
-------------
1141

0 commit comments

Comments
 (0)