-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.drone.yml
38 lines (36 loc) · 1.06 KB
/
.drone.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
build:
hugo:
image: golang:1.5
environment:
- HUGO=0.15_linux_amd64
commands:
- curl -L -o /tmp/hugo_$HUGO.tar.gz https://github.com/spf13/hugo/releases/download/v0.15/hugo_$HUGO.tar.gz
- tar xvf /tmp/hugo_$HUGO.tar.gz -C /tmp/
- mv /tmp/hugo_$HUGO/hugo_$HUGO /usr/bin/hugo
- mkdir ../gh-pages
- hugo -d ../gh-pages
when:
branch: tea-ci
push:
image: golang:1.5
environment:
- user=$$USER
- pass=$$PASS
commands:
- ls
- ls ..
- git fetch --no-tags --depth=50 origin +refs/heads/gh-pages
- git checkout gh-pages
- rm -rf ./*
- cp ../gh-pages/* -r .
- git add .
- git config --global user.email [email protected]
- git config --global user.name "Tea CI Docs Bot"
- git commit -a -m "Github pages auto update."
- echo machine github.com > ~/.netrc
- echo login $user >> ~/.netrc
- echo password $pass >> ~/.netrc
- chmod 600 ~/.netrc
- git push -f origin gh-pages
when:
branch: tea-ci