This repository has been archived by the owner on Jul 30, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wercker.yml
62 lines (62 loc) · 2.3 KB
/
wercker.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
box: danmaq/jekyll-git-redcarpet:github-pages
build:
steps:
- script:
name: 作業始める前に、コンテナのシステム更新しておこっか
code: |
echo 'install: --no-document' >> ~/.gemrc
echo 'update: --no-document' >> ~/.gemrc
apk update
apk upgrade
gem update --system
gem update
- script:
name: 大丈夫だね。まず GitHub に SSH で繋ぐために必要な秘密鍵の設定やるよー
code: |
cd ~
echo ${PRIVATE_KEY} | sed 's/\\n/\n/g' > .ssh/id_rsa
chmod 600 .ssh/id_rsa
- script:
name: そうそう、 Git のユーザー設定もしなきゃね!
code: |
init.sh
- script:
name: 準備おっけー? GitHub から記事リポジトリをクローンするよ!
code: |
cd /tmp
git clone ${REPO_ARTICLES}
- script:
name: 次に GitHub からテーマリポジトリもクローンするよ!
code: |
cd /tmp
git clone ${REPO_THEME}
- script:
name: いい感じっ!クローンしたデータを作業台に載せるよ!
code: |
cp -r /tmp/danmaq.articles/root/* ${WORK}/
cp -r /tmp/danmaq.articles/_posts ${WORK}/
cp -r /tmp/danmaq.jekyll/theme/* ${WORK}/
cd ${WORK}
- script:
name: 成果物を作るよ!Jekyll さん、ビルドお願いっ!
code: jekyll b
- script:
name: やったー!じゃあ今度は、成果物を入れるリポジトリもクローンしようね!
code: |
cd /tmp/
git clone git@github.com:danmaq/danmaq.github.io.git
- script:
name: 受け皿ができた感じ。じゃあ成果物を入れちゃおうね!
code: cp -r ${WORK}/_site/* /tmp/danmaq.github.io/
- script:
name: 最後の仕上げだよ!新しい成果物を確定しちゃおう!
code: |
cd /tmp/danmaq.github.io
git add -A
git commit -m 'Converted from danmaq/danmaq.articles:master'
git push
- script:
name: 終わり!お掃除するよ!
code: |
rm -rf /tmp/* /tmp/.[^.] /tmp/.??*
rm -rf ${WORK}/* ${WORK}/.[^.] ${WORK}/.??*