Skip to content

Commit 0915d51

Browse files
committed
Update fabric task for deployment
1 parent f00311e commit 0915d51

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

fabfile.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,12 @@ def preview():
6565

6666

6767
def publish(commit_message):
68-
env.msg = commit_message
6968
"""Publish to GitHub Pages"""
69+
env.msg = commit_message
70+
env.GH_TOKEN = os.getenv('GH_TOKEN')
71+
env.TRAVIS_REPO_SLUG = os.getenv('TRAVIS_REPO_SLUG')
7072
clean()
71-
preview()
72-
local("ghp-import -m '{msg}' -b {gp_branch} {deploy_path}".format(**env))
73-
local("git push origin {gp_branch}".format(**env))
73+
local('pelican -s publishconf.py')
74+
with hide('running', 'stdout', 'stderr'):
75+
local("ghp-import -m '{msg}' -b {gp_branch} {deploy_path}".format(**env))
76+
local("git push -fq https://{GH_TOKEN}@github.com/{TRAVIS_REPO_SLUG}.git {gp_branch}".format(**env))

0 commit comments

Comments
 (0)