1 | #!/bin/bash
|
2 |
|
3 | set -e
|
4 |
|
5 | SHA=`git rev-parse --verify HEAD`
|
6 |
|
7 | git config user.name "Travis CI"
|
8 | git config user.email "builds@ethereum.org"
|
9 | git checkout --orphan gh-pages
|
10 | git rm --cached -r .
|
11 | echo "# Automatic build" > README.md
|
12 | echo "Built website from {$SHA}. See https://github.com/ethereum/remix/ for details." >> README.md
|
13 |
|
14 |
|
15 |
|
16 | cp remix-debugger/index.html index.html
|
17 | mkdir build
|
18 | cp remix-debugger/build/app.js build/app.js
|
19 | mkdir assets
|
20 | cp -R remix-debugger/assets/. assets/
|
21 |
|
22 | git add -f README.md index.html build/app.js assets
|
23 | git commit -m "Built website from {$SHA}."
|
24 |
|
25 | ENCRYPTION_LABEL=fade88419824
|
26 | ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key"
|
27 | ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv"
|
28 | ENCRYPTED_KEY=${!ENCRYPTED_KEY_VAR}
|
29 | ENCRYPTED_IV=${!ENCRYPTED_IV_VAR}
|
30 | openssl aes-256-cbc -K $ENCRYPTED_KEY -iv $ENCRYPTED_IV -in ci/deploy_key.enc -out deploy_key -d
|
31 | chmod 600 deploy_key
|
32 | eval `ssh-agent -s`
|
33 | ssh-add deploy_key
|
34 |
|
35 | git push -f git@github.com:ethereum/remix.git gh-pages
|