Skip to content

Commit

Permalink
feat : FIS ec2 pipeline added
Browse files Browse the repository at this point in the history
  • Loading branch information
mofahsan committed May 19, 2024
1 parent b290be4 commit 9b6868e
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 31 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/FIS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# This is a basic workflow to help you get started with Actions

name: FIS_Deployment

# Controls when the workflow will run
on:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
deploy:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Deploy Protocol Server bpp
run: |
ssh -o StrictHostKeyChecking=no -tt ${{ secrets.USER}}@${{ secrets.HOST }} <<EOF
cd /home/ahsan_witslab/projects/protocol_server_seller
echo "cleaning up folder"
rm -rf protocol-server-engine
echo "rebuilding the folder"
git clone https://github.com/ONDC-Official/protocol-server-engine.git
cd protocol-server-engine
git checkout dev
cp /home/ahsan_witslab/projects/env/protocol_server_seller.env .env
sudo docker stop protocol_server_bpp || true && sudo docker rm -f protocol_server_bpp || true && sudo docker build -t protocol_server_image_bpp . && sudo docker run -p 5500:5500 --name protocol_server_bpp -d protocol_server_image_bpp && exit
EOF
- name: Deploy Protocol Server bap
run: |
ssh -o StrictHostKeyChecking=no -tt ${{ secrets.USER}}@${{ secrets.HOST }} <<EOF
cd /home/ahsan_witslab/projects
echo "cleaning up folder"
rm -rf protocol-server-engine
echo "rebuilding the folder"
git clone https://github.com/ONDC-Official/protocol-server-engine.git
cd protocol-server-engine
git checkout dev
cp /home/ahsan_witslab/projects/env/protocol_server_buyer.env .env
sudo docker stop protocol_server_bap || true && sudo docker rm -f protocol_server_bap || true && sudo docker build -t protocol_server_image_bap . && sudo docker run -p 4100:4100 --name protocol_server_bap -d protocol_server_image_bap && exit
EOF
31 changes: 0 additions & 31 deletions .github/workflows/blank.yml

This file was deleted.

0 comments on commit 9b6868e

Please sign in to comment.