-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
2 changed files
with
56 additions
and
31 deletions.
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,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 | ||
This file was deleted.
Oops, something went wrong.