File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 branches : [ "main" ]
66
77jobs :
8- deploy-on-vm1 :
8+ deploy-on-vm :
99 runs-on : self-hosted
1010
11- steps :
12- - name : Check out repository code
13- uses : actions/checkout@v4
14-
15- - name : Execute deployment script
16- env :
17- PORT_FROM_SECRET : ${{ secrets.NODE_TCP_PORT }}
18- run : |
19- chmod +x deploy.sh
20- ./deploy.sh
21- deploy-on-vm2 :
22- runs-on : self-hosted
11+ strategy :
12+ matrix :
13+ # creates two parallel runs of this job
14+ instance : [1, 2]
2315
2416 steps :
2517 - name : Check out repository code
3123 run : |
3224 chmod +x deploy.sh
3325 ./deploy.sh
26+
Original file line number Diff line number Diff line change 99 - cron : ' 0 3 * * 0'
1010
1111jobs :
12- cleanup-vm1 :
12+ cleanup-vms :
1313 name : Run Cleanup Script on VM1
1414 runs-on : self-hosted
1515
16- steps :
17- - name : Check out repository
18- uses : actions/checkout@v4
19-
20- - name : Run Maintenance Script
21- run : |
22- chmod +x maintenance.sh
23- ./maintenance.sh
24- cleanup-vm2 :
25- name : Run Cleanup Script on VM2
26- runs-on : self-hosted
16+ strategy :
17+ matrix :
18+ # creates two parallel runs of this job
19+ instance : [1, 2]
2720
2821 steps :
2922 - name : Check out repository
Original file line number Diff line number Diff line change 55 workflow_dispatch :
66
77jobs :
8- destroy-on-vm1 :
9- name : Stop and Remove Services from VMs
10- runs-on : self-hosted
11-
12- steps :
13- - name : Check out repository
14- uses : actions/checkout@v4
15-
16- - name : Run Destruction Script
17- run : |
18- chmod +x teardown.sh
19- ./teardown.sh
20- destroy-on-vm2 :
8+ destroy :
219 name : Stop and Remove Services from VMs
2210 runs-on : self-hosted
11+
12+ # use a matrix strategy to run the job multiple times
13+ strategy :
14+ matrix :
15+ # creates two parallel runs of this job
16+ instance : [1, 2]
2317
2418 steps :
2519 - name : Check out repository
You can’t perform that action at this time.
0 commit comments