mirror of
https://github.com/mkdocs/mkdocs.git
synced 2026-03-27 09:58:31 +07:00
Enable gh-deploy to work if the mkdocs.yml is not in the repo root
Fixes #578
This commit is contained in:
@@ -17,11 +17,13 @@ You can determine your currently installed version using `mkdocs --version`:
|
||||
|
||||
* Improve Unicode handling by ensuring that all YAML strings are loaded as Unicode.
|
||||
* Remove dependancy on the six library. (#583)
|
||||
* Remove dependancy on the ghp-import library. (#547)
|
||||
* Add `--quiet` and `--verbose` options to all subcommands.
|
||||
* Add short options (`-a`) to most command line options.
|
||||
* Add copyright footer for readthedocs theme.
|
||||
* Bugfix: Fix a JavaScript encoding problem when searching with spaces. (#586)
|
||||
* Stack traces are no longer displayed on socket errors, just an error message.
|
||||
* Bugfix: gh-deploy now works if the mkdocs.yml is not in the git repo root (#578)
|
||||
|
||||
## Version 0.13.3 (2015-06-02)
|
||||
|
||||
|
||||
@@ -8,10 +8,12 @@ log = logging.getLogger(__name__)
|
||||
|
||||
def gh_deploy(config, message=None):
|
||||
|
||||
if not os.path.exists('.git'):
|
||||
log.info('Cannot deploy - this directory does not appear to be a git '
|
||||
'repository')
|
||||
return
|
||||
proc = subprocess.Popen(['git', 'rev-parse', '--is-inside-work-tree'],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
proc.communicate()
|
||||
if proc.wait() != 0:
|
||||
log.error('Cannot deploy - this directory does not appear to be a git '
|
||||
'repository')
|
||||
|
||||
command = ['ghp-import', '-p', config['site_dir']]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user