forked from jerry123je/aws-iot-labs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec-release.yml
43 lines (41 loc) · 1.14 KB
/
buildspec-release.yml
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
40
41
42
43
version: 0.2
env:
parameter-store:
GITHUB_TOKEN: "GITHUB_TOKEN"
phases:
install:
commands:
- echo Entered the install phase...
- echo $CODEBUILD_SOURCE_VERSION
- echo build for release
- npm install gitbook-cli -g
pre_build:
commands:
- echo Entered the pre_build phase...
- gitbook install
build:
commands:
- echo Entered the build phase...
- echo Build started on `date`
- gitbook build
- git checkout gh-pages
- git pull origin gh-pages --rebase
- cp -R _book/* .
post_build:
commands:
- echo Entered the post_build phase...
- echo Build completed on `date`
- git clean -fx node_modules
- git clean -fx _book
- git add .
- git remote rm origin
- git remote add origin https://joeshi:[email protected]/chinalabs/aws-iot-labs.git
- git config --global user.email "[email protected]"
- git config --global user.name "Joe SHI"
- git commit -a -m "Update docs"
- git push --set-upstream origin gh-pages
- echo gh-pages updated
artifacts:
files:
- _book/**/*
discard-paths: yes