Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds testnet/mainnet BE deploy #585

Open
wants to merge 2 commits into
base: QA-Test
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/deploy-mainnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CD for flyover-api Mainnet

on:
release:
types: [published]

jobs:
execute-command:
runs-on: ubuntu-latest
environment: mainnet
permissions:
id-token: write
contents: read

steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Execute deployment command on EC2 instance
run: |
aws ssm send-command \
--document-name "deployBEMainnetDocument" \
--instance-ids "$INSTANCE_ID" \
--document-version '$LATEST'
echo "Deploy sent to EC2 instance"
env:
INSTANCE_ID: ${{ secrets.MAINNET_INSTANCE_ID }}
34 changes: 34 additions & 0 deletions .github/workflows/deploy-testnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CD for flyover-api Testnet

on:
push:
branches:
- QA-Test

jobs:
execute-command:
runs-on: ubuntu-latest
environment: testnet
permissions:
id-token: write
contents: read

steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Execute deployment command on EC2 instance
run: |
aws ssm send-command \
--document-name "deployBETestnetDocument" \
--instance-ids "$INSTANCE_ID" \
--document-version '$LATEST'
echo "Deploy sent to EC2 instance"
env:
INSTANCE_ID: ${{ secrets.TESTNET_INSTANCE_ID }}
3 changes: 3 additions & 0 deletions deploy/usr/local/libexec/do-deploy
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# deploy script
/home/ubuntu/flyover-deploy/liquidity-provider-server && docker system prune -f && git fetch --all && latestTag=$(git describe --tags "$(git rev-list --tags --max-count=1)")
&& git checkout $latestTag && docker-compose -f docker-compose.yml -f loki-mainnet.yml --env-file .env.mainnet up -d --build lps
Loading