Skip to content

Commit

Permalink
changes in cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
Purshotam patidar committed Jun 21, 2024
1 parent f84caa8 commit df4423f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 41 deletions.
72 changes: 36 additions & 36 deletions .github/workflows/deploy-quality.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
name: Deploy with Docker Compose
name: Deploy Impler to Quality

on:
push:
branches:
- next

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Setup Project
uses: ./.github/workflows/reusable-setup.yml
setup_project:
uses: ./.github/workflows/reusable-setup.yml
# runs-on: ubuntu-latest
# steps:
# - name: Setup Project
# uses: ./.github/workflows/reusable-setup.yml

- name: Build API
if: ${{ github.event_name == 'push' && (github.event.head_commit.modified || github.event.head_commit.added || github.event.head_commit.removed) && contains(toJSON(github.event.head_commit.modified), 'apps/api/') }}
uses: ./.github/workflows/build-api.yml

- name: Build Embed
if: ${{ github.event_name == 'push' && (github.event.head_commit.modified || github.event.head_commit.added || github.event.head_commit.removed) && contains(toJSON(github.event.head_commit.modified), 'apps/embed/') }}
uses: ./.github/workflows/build-embed.yml

- name: Build Queue Manager
if: ${{ github.event_name == 'push' && (github.event.head_commit.modified || github.event.head_commit.added || github.event.head_commit.removed) && contains(toJSON(github.event.head_commit.modified), 'apps/queuemanager/') }}
uses: ./.github/workflows/build-queuemanager.yml

- name: Build Web
if: ${{ github.event_name == 'push' && (github.event.head_commit.modified || github.event.head_commit.added || github.event.head_commit.removed) && contains(toJSON(github.event.head_commit.modified), 'apps/web/') }}
uses: ./.github/workflows/build-web.yml

- name: Build Widget
if: ${{ github.event_name == 'push' && (github.event.head_commit.modified || github.event.head_commit.added || github.event.head_commit.removed) && contains(toJSON(github.event.head_commit.modified), 'apps/widget/') }}
uses: ./.github/workflows/build-widget.yml

- name: Setup SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Run Docker Compose Up
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} \
"cd /home/impler/impler-quality && docker-compose up -d"
# - name: Build API
# if: ${{ github.event_name == 'push' && (github.event.head_commit.modified || github.event.head_commit.added || github.event.head_commit.removed) && contains(toJSON(github.event.head_commit.modified), 'apps/api/') }}
# uses: ./.github/workflows/build-api.yml

# - name: Build Embed
# if: ${{ github.event_name == 'push' && (github.event.head_commit.modified || github.event.head_commit.added || github.event.head_commit.removed) && contains(toJSON(github.event.head_commit.modified), 'apps/embed/') }}
# uses: ./.github/workflows/build-embed.yml

# - name: Build Queue Manager
# if: ${{ github.event_name == 'push' && (github.event.head_commit.modified || github.event.head_commit.added || github.event.head_commit.removed) && contains(toJSON(github.event.head_commit.modified), 'apps/queuemanager/') }}
# uses: ./.github/workflows/build-queuemanager.yml

# - name: Build Web
# if: ${{ github.event_name == 'push' && (github.event.head_commit.modified || github.event.head_commit.added || github.event.head_commit.removed) && contains(toJSON(github.event.head_commit.modified), 'apps/web/') }}
# uses: ./.github/workflows/build-web.yml

# - name: Build Widget
# if: ${{ github.event_name == 'push' && (github.event.head_commit.modified || github.event.head_commit.added || github.event.head_commit.removed) && contains(toJSON(github.event.head_commit.modified), 'apps/widget/') }}
# uses: ./.github/workflows/build-widget.yml

# - name: Setup SSH
# uses: webfactory/[email protected]
# with:
# ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

# - name: Run Docker Compose Up
# run: |
# ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} \
# "cd /home/impler/impler-quality && docker-compose up -d"
5 changes: 0 additions & 5 deletions .github/workflows/reusable-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ jobs:
# The type of runner that the job will run on
runs-on: ubuntu-latest
timeout-minutes: 80
environment: Production
permissions:
contents: read
packages: write
deployments: write
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
Expand Down

0 comments on commit df4423f

Please sign in to comment.