Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (27 sloc) 982 Bytes
version: 2
jobs:
deploy:
docker:
- image: circleci/elixir:1.7.4
steps:
- checkout
- run: sudo apt-get update
- run: sudo apt-get install -y python-pip
- run: sudo pip install gigalixir --ignore-installed six
- run: gigalixir login -e "$GIGALIXIR_EMAIL" -y -p "$GIGALIXIR_PASSWORD"
- run:
name: Set app name # See https://circleci.com/docs/2.0/env-vars/#setting-an-environment-variable-in-a-shell-command
command: |
echo 'export SUFFIX=$(echo $CIRCLE_BRANCH | tr "[:upper:]" "[:lower:]" | tr -cd "[a-z0-9-]")' >> $BASH_ENV
echo 'export APP_NAME="$GIGALIXIR_APP_NAME-$SUFFIX"' >> $BASH_ENV
source $BASH_ENV
- run: gigalixir create --name $APP_NAME || gigalixir git:remote $APP_NAME
- run: git push -f gigalixir HEAD:refs/heads/master
workflows:
version: 2
deploy:
jobs:
- deploy:
filters:
branches:
only: master
You can’t perform that action at this time.