Skip to content

Commit e85f026

Browse files
committed
Use ugly metho to fix for circle-ci 2.0
I'll migrate to github-action to replace the circle-ci. Signed-off-by: Yen-Chin Lee <coldnew.tw@gmail.com>
1 parent 4a36a49 commit e85f026

2 files changed

Lines changed: 36 additions & 1 deletion

File tree

.circleci/config.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,39 @@ jobs:
104104
path: /tmp/circleci-artifacts
105105
- store_artifacts:
106106
path: /tmp/circleci-test-results
107+
108+
deploy:
109+
working_directory: ~/clojure-tw/weekly
110+
docker:
111+
- image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37
112+
steps:
113+
- checkout
114+
- restore_cache:
115+
keys:
116+
- v1-dependencies-{{ checksum "project.clj" }}
117+
# fallback to using the latest cache if no exact match is found
118+
- v1-dependencies-
119+
- run:
120+
command: sudo update-alternatives --set java /usr/lib/jvm/jdk1.8.0/bin/java; sudo update-alternatives --set javac /usr/lib/jvm/jdk1.8.0/bin/javac; echo -e "export JAVA_HOME=/usr/lib/jvm/jdk1.8.0" >> $BASH_ENV
121+
# This is based on your 1.0 configuration file or project settings
122+
- run: sudo apt-get install curl && curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - && sudo apt-get install -y nodejs
123+
- run: wget -O lein https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein
124+
- run: chmod 755 lein
125+
- run: ./lein -v
126+
- run: ./lein deps
127+
- run: npm install
128+
- run: ./lein run
129+
- run: sed -i 's%https://${GH_TOKEN}@${GH_REF}%git@github.com:clojure-tw/weekly.git%g' deploy.sh
130+
- run: ./deploy.sh
131+
132+
workflows:
133+
version: 2
134+
ci:
135+
jobs:
136+
- build
137+
- deploy:
138+
filters:
139+
branches:
140+
only: master
141+
requires:
142+
- build

deploy.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ mkdir $OUT
2121
cp -R ./build/dist/* $OUT
2222
cp ./resources/public/weekly/*.xml $OUT
2323
cp ./resources/assets/google9d6ebc58aae14a99.html $OUT
24-
cp -f circle.yml $OUT
2524
if hash html-minifier; then
2625
html-minifier --input-dir $OUT --output-dir $OUT --collapse-whitespace --file-ext html
2726
fi

0 commit comments

Comments
 (0)