Skip to content

FIS_Deployment

FIS_Deployment #2

Workflow file for this run

# 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