Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy remix-beta #525

Merged
merged 1 commit into from
Oct 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,36 @@ jobs:
./apps/remix-ide/ci/deploy_from_travis_remix-alpha.sh;
fi

deploy-remix-beta:
docker:
# specify the version you desire here
- image: circleci/node:10.18.0-browsers

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
resource_class: xlarge
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "dist/apps/remix-ide/assets dist/apps/remix-ide/index.html dist/apps/remix-ide/main.js dist/apps/remix-ide/polyfills.js dist/apps/remix-ide/runtime.js dist/apps/remix-ide/vendor.js dist/apps/remix-ide/favicon.ico"
working_directory: ~/remix-project

steps:
- checkout
- run: npm install
- run: npm run lint
- run: npm run build:libs
- run: npm run downloadsolc_root
- run: npm run build
- run:
name: Deploy
command: |
if [ "${CIRCLE_BRANCH}" == "remix_beta" ]; then
./apps/remix-ide/ci/deploy_from_travis_remix-beta.sh;
fi

workflows:
version: 2
build_all:
Expand Down Expand Up @@ -281,3 +311,11 @@ workflows:
filters:
branches:
only: master
- deploy-remix-beta:
requires:
- remix-ide-chrome
- remix-ide-firefox
- remix-ide-run-deploy
filters:
branches:
only: remix_beta
24 changes: 24 additions & 0 deletions apps/remix-ide/ci/deploy_from_travis_remix-beta.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

set -e

SHA=`git rev-parse --short --verify HEAD`

git config user.name "$COMMIT_AUTHOR"
git config user.email "$COMMIT_AUTHOR_EMAIL"
git checkout --orphan gh-pages
git rm --cached -r -f .
echo "# Automatic build" > README.md
echo "Built website from \`$SHA\`. See https://github.com/ethereum/remix-ide/ for details." >> README.md
echo "To use an offline copy, download \`remix-$SHA.zip\`." >> README.md
cp -r $FILES_TO_PACKAGE "./"
rm -rf dist
ls
FILES_TO_DEPLOY="assets index.html main.js polyfills.js runtime.js vendor.js favicon.ico"
# ZIP the whole directory
zip -r remix-$SHA.zip $FILES_TO_DEPLOY
# -f is needed because "build" is part of .gitignore
git add -f $FILES_TO_DEPLOY remix-$SHA.zip
git commit -m "Built website from {$SHA}."

git push -f git@github.com:ethereum/remix-live-beta.git gh-pages