forked from saigonbitmaster/bworks_2.0
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
11fcfc4
commit 85d6fe0
Showing
2 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
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 }}." |
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