build: docker compose #1
Workflow file for this run
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: Push Workflow | |
on: push | |
jobs: | |
messenger-demo-deploy: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/${{ vars.STAGING_BRANCH }}' | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v3 | |
with: | |
registry-url: 'https://npm.pkg.github.com' | |
node-version: 18.0.0 | |
cache: 'yarn' | |
- name: Prepare SSH | |
run: | | |
mkdir ~/.ssh | |
echo "${{ secrets.STAGING_HOST_SSH }}" > ~/.ssh/known_hosts | |
echo "${{ secrets.DO_SSH_KEY }}" > ./ssh-key | |
chmod 600 ./ssh-key | |
- name: Create .env file | |
run: | | |
echo "REACT_APP_ADDR_ENS_SUBDOMAIN=.beta-addr.dm3.eth" >> ./.env | |
echo "REACT_APP_BACKEND=http://${{ secrets.STAGING_HOST }}" >> ./.env | |
echo "REACT_APP_DEFAULT_DELIVERY_SERVICE=beta-ds.dm3.eth" >> ./.env | |
echo "REACT_APP_DEFAULT_SERVICE=http://${{ secrets.STAGING_HOST }}" >> ./.env | |
echo "REACT_APP_ETHEREUM_PROVIDER=${{ secrets.REACT_APP_ETHEREUM_PROVIDER }}" >> ./.env | |
echo "REACT_APP_PROFILE_BASE_URL=http://dm3-beta2-resolver.herokuapp.com" >> ./.env | |
echo "REACT_APP_RESOLVER_BACKEND=http://dm3-beta2-resolver.herokuapp.com" >> ./.env | |
echo "REACT_APP_USER_ENS_SUBDOMAIN=.beta-user.dm3.eth" >> ./.env | |
echo "REACT_APP_WALLET_CONNECT_PROJECT_ID=${{ secrets.REACT_APP_WALLET_CONNECT_PROJECT_ID }}" >> ./.env | |
echo "RESOLVER_ADDR=0x45F7Ed7d05c563D408898A80d9C705CC3328D2EF" >> ./.env | |
echo WEB_PORT=80 >> ./.env | |
- name: Sync files | |
run: | | |
rsync -avz -e 'ssh -i ./ssh-key' ./.env app@${{ secrets.STAGING_HOST }}:/home/app/ | |
rsync -avz -e 'ssh -i ./ssh-key' ./docker/docker-compose.yml app@${{ secrets.STAGING_HOST }}:/home/app/ |