-
Notifications
You must be signed in to change notification settings - Fork 13
35 lines (29 loc) · 940 Bytes
/
deploy_dev.yml
File metadata and controls
35 lines (29 loc) · 940 Bytes
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
name: Deploy OpenKab Dev with Ansible
on:
pull_request:
branches: [rilis-dev]
types: [closed]
permissions:
contents: read
concurrency:
group: deploy-openkab-dev
cancel-in-progress: true
jobs:
deploy:
if: github.event.pull_request.merged == true
name: Deploy OpenKab Dev to Production Server
runs-on: ubuntu-latest
steps:
- name: Checkout Ansible Code
uses: actions/checkout@v4
- name: Deploy via SSH using appleboy/ssh-action
uses: appleboy/ssh-action@v1.2.0
with:
host: ${{ secrets.CICD_SERVER_IP }}
username: ${{ secrets.CICD_SERVER_USER }}
key: ${{ secrets.CICD_SERVER_PRIVATE_KEY }}
port: ${{ secrets.CICD_SERVER_PORT }}
script: |
set -euo pipefail
cd ${{ secrets.CICD_SERVER_PATH }}
ansible-playbook -i inventories/production/inventory.yml playbooks/deploy-openkab-dev.yml