@@ -25,6 +25,8 @@ def main():
|
|||||||
current = next(v for v in volumes if v['name']=='site')
|
current = next(v for v in volumes if v['name']=='site')
|
||||||
previous = current['hostPath']['path']
|
previous = current['hostPath']['path']
|
||||||
assert previous == '/var/gnoc/hugo-public' or previous.startswith('/var/gnoc/site-releases/'), 'Unexpected production mount'
|
assert previous == '/var/gnoc/hugo-public' or previous.startswith('/var/gnoc/site-releases/'), 'Unexpected production mount'
|
||||||
|
owner = ssh('id','-un',capture=True).strip()
|
||||||
|
ssh('sudo','install','-d','-m','0755','-o',owner,'/var/gnoc/site-releases')
|
||||||
ssh('mkdir','-p',target)
|
ssh('mkdir','-p',target)
|
||||||
run('rsync','-az','--chmod=D755,F644',str(ROOT/'public')+'/',f'{HOST}:{target}/')
|
run('rsync','-az','--chmod=D755,F644',str(ROOT/'public')+'/',f'{HOST}:{target}/')
|
||||||
def point(path):
|
def point(path):
|
||||||
|
|||||||
Reference in New Issue
Block a user