File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy OpenKab Dev with Ansible
2+
3+ on :
4+ pull_request :
5+ branches : [rilis-dev]
6+ types : [closed]
7+
8+ permissions :
9+ contents : read
10+
11+ concurrency :
12+ group : deploy-openkab-dev
13+ cancel-in-progress : true
14+
15+ jobs :
16+ deploy :
17+ if : github.event.pull_request.merged == true
18+ name : Deploy OpenKab Dev to Production Server
19+ runs-on : ubuntu-latest
20+
21+ steps :
22+ - name : Checkout Ansible Code
23+ uses : actions/checkout@v4
24+
25+ - name : Deploy via SSH using appleboy/ssh-action
26+ uses : appleboy/ssh-action@v1.2.0
27+ with :
28+ host : ${{ secrets.CICD_SERVER_IP }}
29+ username : ${{ secrets.CICD_SERVER_USER }}
30+ key : ${{ secrets.CICD_SERVER_PRIVATE_KEY }}
31+ port : ${{ secrets.CICD_SERVER_PORT }}
32+ script : |
33+ set -euo pipefail
34+ cd ${{ secrets.CICD_SERVER_PATH }}
35+ ansible-playbook -i inventories/production/inventory.yml playbooks/deploy-openkab-dev.yml
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Deploy OpenKab Rilis with Ansible
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ permissions :
8+ contents : read
9+
10+ concurrency :
11+ group : deploy-openkab-rilis
12+ cancel-in-progress : true
13+
14+ jobs :
15+ deploy :
16+ # rilis dari branch 'master' & bukan prerelease
17+ if : github.event.release.target_commitish == 'master' && github.event.release.prerelease == false
18+ name : Deploy OpenKab Rilis to Production Server
19+ runs-on : ubuntu-latest
20+
21+ steps :
22+ - name : Checkout Ansible Code
23+ uses : actions/checkout@v4
24+
25+ - name : Deploy via SSH using appleboy/ssh-action
26+ uses : appleboy/ssh-action@v1.2.0
27+ with :
28+ host : ${{ secrets.CICD_SERVER_IP }}
29+ username : ${{ secrets.CICD_SERVER_USER }}
30+ key : ${{ secrets.CICD_SERVER_PRIVATE_KEY }}
31+ port : ${{ secrets.CICD_SERVER_PORT }}
32+ script : |
33+ set -euo pipefail
34+ cd ${{ secrets.CICD_SERVER_PATH }}
35+ ansible-playbook -i inventories/production/inventory.yml playbooks/deploy-openkab-rilis.yml --extra-vars "release_tag=${{ github.event.release.tag_name }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments