Skip to content

Commit a831b57

Browse files
authored
Use ghp-import instead of mkdocs gh-deploy script. (#341)
1 parent 3e51987 commit a831b57

File tree

5 files changed

+39
-18
lines changed

5 files changed

+39
-18
lines changed

azure-pipelines.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,8 @@ jobs:
3535
condition: |
3636
and(succeeded(),
3737
eq(variables['Build.SourceBranch'], 'refs/heads/develop'))
38+
env:
39+
GIT_COMMITTER_NAME: $(git.name)
40+
GIT_COMMITTER_EMAIL: $(git.email)
41+
GIT_COMMITTER_PASSWORD: $(git.password)
3842
displayName: Run deploy.

docs/CNAME

Lines changed: 0 additions & 1 deletion
This file was deleted.

poetry.lock

Lines changed: 27 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ authors = ["Artem Malyshev <proofit404@gmail.com>"]
66

77
[tool.poetry.dependencies]
88
python = "^3.8"
9+
ghp-import = "^0.5.5"
910
mkdocs = "^1.0.4"
1011
mkdocs-material = "^4.6.0"
1112

tasks.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
from os import environ
2+
3+
from invoke import Responder
14
from invoke import task
25

36

@@ -22,4 +25,7 @@ def build(c):
2225

2326
@task
2427
def deploy(c):
25-
c.run("poetry run mkdocs gh-deploy --remote-branch master")
28+
command = "poetry run ghp-import --cname dry-python.org --branch master --push site"
29+
enter_username = Responder(r"Username: ", environ["GIT_COMMITTER_NAME"])
30+
enter_password = Responder(r"Password: ", environ["GIT_COMMITTER_PASSWORD"])
31+
c.run(command, watchers=[enter_username, enter_password])

0 commit comments

Comments
 (0)