Skip to content

jackchuong is deploying homepage 🚀 #1

jackchuong is deploying homepage 🚀

jackchuong is deploying homepage 🚀 #1

name: deploy homepage
run-name: ${{ github.actor }} is deploying homepage 🚀
on:
workflow_dispatch:
jobs:
restart-api-service:
runs-on: ubuntu-latest
environment:
name: mainnet
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: restart homepage
uses: appleboy/[email protected]
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd /home/${{ secrets.REMOTE_USER }}/bworks_2.0_deploy/docker-configs
docker-compose -f docker-compose.yml stop homepage
docker-compose -f docker-compose.yml rm -f homepage
cat docker-compose.template.yml > docker-compose.yml
sed -i "s|BWORKS_HOMEPAGE_TAG|${{ vars.BWORKS_HOMEPAGE_TAG }}|g" docker-compose.yml
#docker rmi -f 121427815363.dkr.ecr.ap-southeast-1.amazonaws.com/bworks:frontend-testnet
#docker rmi -f jackchuong/itl:bworks-frontend-testnet
aws ecr get-login-password --region ap-southeast-1 | docker login --username AWS --password-stdin 121427815363.dkr.ecr.ap-southeast-1.amazonaws.com/bworks
docker-compose -f docker-compose.yml up -d homepage
- run: echo "🍏 This job's status is ${{ job.status }}."