-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (41 loc) · 1.1 KB
/
ci-cd.yml
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
name: Laravel CI/CD Workflow
on:
push:
branches:
- production
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Run CI job
uses: basantsd/laravel-ci-cd@v1
with:
job: 'ci'
github_token: ${{ secrets.GITHUB_TOKEN }}
repo: 'your-username/your-repo'
code_cleanup:
runs-on: ubuntu-latest
needs: ci
steps:
- name: Run Code Cleanup job
uses: basantsd/laravel-ci-cd@v1
with:
job: 'code_cleanup'
github_token: ${{ secrets.GITHUB_TOKEN }}
repo: 'your-username/your-repo'
cd:
runs-on: ubuntu-latest
needs: code_cleanup
steps:
- name: Run CD job
uses: basantsd/laravel-ci-cd@v1
with:
job: 'cd'
vps_private_key: ${{ secrets.VPS_PRIVATE_KEY }}
vps_username: ${{ secrets.VPS_USERNAME }}
vps_host: ${{ secrets.VPS_HOST }}
deploy_path: '/path/to/deploy'
production_branch: 'main'
php_version: '8.2'
github_token: ${{ secrets.GITHUB_TOKEN }}
repo: 'your-username/your-repo'