-
Notifications
You must be signed in to change notification settings - Fork 34
75 lines (68 loc) · 2.42 KB
/
deploy-quality.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Deploy Impler to Quality
on:
pull_request:
branches: [next]
types:
- closed
workflow_dispatch:
jobs:
build_api:
permissions:
contents: read
packages: write
deployments: write
if: ${{ (github.event.pull_request.merged == true) && (contains(github.event.pull_request.labels.*.name, 'impler/api')) }}
uses: ./.github/workflows/build-api.yml
secrets: inherit
build_embed:
permissions:
contents: read
packages: write
deployments: write
if: ${{ (github.event.pull_request.merged == true) && (contains(github.event.pull_request.labels.*.name, 'impler/embed')) }}
uses: ./.github/workflows/build-embed.yml
secrets: inherit
build_queuemanager:
permissions:
contents: read
packages: write
deployments: write
if: ${{ (github.event.pull_request.merged == true) && (contains(github.event.pull_request.labels.*.name, 'impler/queue-manager')) }}
uses: ./.github/workflows/build-queuemanager.yml
secrets: inherit
build_web:
permissions:
contents: read
packages: write
deployments: write
if: ${{ (github.event.pull_request.merged == true) && (contains(github.event.pull_request.labels.*.name, 'impler/web')) }}
uses: ./.github/workflows/build-web.yml
secrets: inherit
build_widget:
permissions:
contents: read
packages: write
deployments: write
if: ${{ (github.event.pull_request.merged == true) && (contains(github.event.pull_request.labels.*.name, 'impler/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 Up the service
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 }} && sudo docker compose up --pull always -d && sudo docker image prune -a -f"