Merge pull request #10 from Zebec-protocol/dev #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Staging | |
on: | |
push: | |
branches: | |
- "staging" | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
environment: staging | |
steps: | |
- name: "deploy inside server" | |
uses: appleboy/[email protected] | |
env: | |
APP_ENV_VARS: ${{ vars.APP_ENV_VARS }} | |
with: | |
host: ${{ vars.EC2_HOST }} | |
username: ${{ vars.EC2_USER }} | |
key: ${{ secrets.SSH_KEY }} | |
port: "22" | |
envs: APP_ENV_VARS | |
script_stop: true | |
script: | | |
cd safe-transaction-service | |
git pull origin staging | |
echo "$APP_ENV_VARS" | base64 -d > .env | |
docker-compose build --force-rm | |
docker-compose up --force-recreate -d |