Skip to content

Commit

Permalink
build: add ci/cd for market maker bot (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
JuArce authored Dec 16, 2023
1 parent fccdae1 commit fc691a5
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/production-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "Production Build"
on:
push:
branches:
- main

jobs:
Deploy:
name: Deploy to EC2
runs-on: ubuntu-latest

steps:
- name: Deploy
run: echo I am deploying the api to AWS

- name: Deploy in EC2
env:
PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
HOST_NAME: ${{ secrets.HOST_NAME }}
USER_NAME: ${{ secrets.USER_NAME }}
APP_DIR: ${{ secrets.APP_DIR }}
SERVICE_NAME: ${{ secrets.SERVICE_NAME }}
run:
echo "$PRIVATE_KEY" > private_key &&
chmod 400 private_key &&
ssh -o StrictHostKeyChecking=no -i private_key ${USER_NAME}@${HOST_NAME} "
cd ${APP_DIR} &&
sudo systemctl stop ${SERVICE_NAME} &&
git pull &&
sudo systemctl start ${SERVICE_NAME} "

0 comments on commit fc691a5

Please sign in to comment.