Skip to content

api-changed (#620)

api-changed (#620) #33

name: Deploy Impler to Quality
on:
push:
branches:
- next
jobs:
build_api:
permissions:
contents: read
packages: write
deployments: write
if: ${{ contains(github.event.head_commit.message, 'api-changed') }}
uses: ./.github/workflows/build-api.yml
secrets: inherit
build_embed:
permissions:
contents: read
packages: write
deployments: write
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), 'libs/embed/') || contains(toJSON(github.event.head_commit.added), 'libs/embed/') || contains(toJSON(github.event.head_commit.removed), 'libs/embed/')) }}
uses: ./.github/workflows/build-embed.yml
secrets: inherit
build_queuemanager:
permissions:
contents: read
packages: write
deployments: write
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/queue-manager/') || contains(toJSON(github.event.head_commit.added), 'apps/queue-manager/') || contains(toJSON(github.event.head_commit.removed), 'apps/queue-manager/')) }}
uses: ./.github/workflows/build-queuemanager.yml
secrets: inherit
build_web:
permissions:
contents: read
packages: write
deployments: write
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/') || contains(toJSON(github.event.head_commit.added), 'apps/web/') || contains(toJSON(github.event.head_commit.removed), 'apps/web/')) }}
uses: ./.github/workflows/build-web.yml
secrets: inherit
build_widget:
permissions:
contents: read
packages: write
deployments: write
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/') || contains(toJSON(github.event.head_commit.added), 'apps/widget/') || contains(toJSON(github.event.head_commit.removed), 'apps/widget/')) }}
uses: ./.github/workflows/build-widget.yml
secrets: inherit
deploy_with_ssh:
runs-on: ubuntu-latest
needs:
- build_api
- build_embed
- build_queuemanager
- build_web
- build_widget
if: |
always() &&
(needs.build_api.result == 'success' || needs.build_embed.result == 'success' || needs.build_queuemanager.result == 'success' || needs.build_web.result == 'success' || needs.build_widget.result == 'success')
steps:
- name: Set up SSH and Run Docker Compose Up
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY_QA }}
- name: Run Docker Compose Up
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME_QA }}@${{ secrets.SSH_HOST_QA }} \
"cd ${{ secrets.SSH_PATH_QA }} && docker compose up -d"