-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathfabfile.py
40 lines (30 loc) · 897 Bytes
/
fabfile.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# -*- coding: utf-8 -*-
"""
fabfile
Fab file to build and push documentation to github
:copyright: © 2015-2016 by Fulfil.io Inc.
:copyright: © 2013-2014 by Openlabs Technologies & Consulting (P) Limited
:license: BSD, see LICENSE for more details.
"""
import time
import getpass
import os
from fabric.api import (
local, lcd, cd, sudo, execute, settings, env, run, prompt
)
from fabric.decorators import hosts
def upload_documentation():
"""
Build and upload the documentation HTML to github
"""
# Build the documentation
local('grunt ngdocs')
# Checkout to gh-pages branch
local('git checkout gh-pages')
# Copy back the files from docs folder
local('cp -a docs/* .')
# Add the relevant files
local('git add .')
local('git commit -m "Build documentation"')
local('git push')
local('git checkout develop')