You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

36 lines
1.2 KiB

pipeline:
deploy:
image: debian
environment:
LANG: en_US.UTF-8
LANGUAGE: en_US.UTF-8
LC_ALL: en_US.UTF-8
MIX_ENV: prod
commands:
- apt-get update
- apt-get --yes install gpg locales openssh-client rsync wget
- locale-gen $LANG
- wget "https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb"
- dpkg -i erlang-solutions_2.0_all.deb
- apt-get update
- apt-get --yes install elixir esl-erlang
- mkdir ~/.ssh
- echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
- echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
- chmod 700 ~/.ssh
- chmod 600 ~/.ssh/id_ed25519
- chmod 644 ~/.ssh/known_hosts
- mix local.hex --force
- mix local.rebar --force
- mix deps.get --only prod
- mix release
- rsync --checksum --chmod=775 --compress --copy-links --delete --human-readable --partial --recursive --rsh="ssh -i ~/.ssh/id_ed25519" _build/prod/ deploy@jeremyboles.com:/srv/ann/build/
- ssh -i ~/.ssh/id_ed25519 -tt deploy@jeremyboles.com "sudo systemctl restart ann"
secrets:
- SSH_KNOWN_HOSTS
- SSH_PRIVATE_KEY