-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildspec.yml
43 lines (40 loc) · 1.18 KB
/
buildspec.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:
variables:
BLOG_CONF_DIR: "my-blog-config"
BLOG_CONF_REPO: "aweimeow/my-blog-config.git"
phases:
install:
commands:
- echo Entered the install phase...
runtime-versions:
nodejs: 16
pre_build:
commands:
- git clone https://aweimeow:[email protected]/$BLOG_CONF_REPO
- npm install
- npm install hexo-cli -g
build:
commands:
- echo "Build started on `date`, triggered by $CODEBUILD_WEBHOOK_TRIGGER"
- cp $BLOG_CONF_DIR/conf/* .
- cp $BLOG_CONF_DIR/js/* ./node_modules/hexo-theme-icarus/scripts/
- cp $BLOG_CONF_DIR/img/* ./node_modules/hexo-theme-icarus/source/img/
- cp $BLOG_CONF_DIR/css/custom.styl ./node_modules/hexo-theme-icarus/source/css/
- echo "@import 'custom'" >> ./node_modules/hexo-theme-icarus/source/css/default.styl
- ls -al ./node_modules/hexo-theme-icarus/source/css
- hexo generate
post_build:
commands:
- echo "Build completed on `date`"
artifacts:
files:
- '**/*'
discard-paths: no
base-directory: public
secondary-artifacts:
artifact1:
files:
- '**/*'
base-directory: public
discard-paths: no