Skip to content

Commit a06dc6b

Browse files
committed
Add vapor.yml
1 parent 3a43fb0 commit a06dc6b

File tree

5 files changed

+409
-2
lines changed

5 files changed

+409
-2
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Deploy to Vapor Production
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- feat/vapor
8+
9+
jobs:
10+
vapor:
11+
name: Deploy to Vapor Production
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
# Step 1: Checkout the repository
16+
- uses: actions/checkout@v2
17+
18+
# Step 2: Setup PHP
19+
- name: Setup PHP
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: 8.3 # Updated to PHP 8.3 to match your Vapor config
23+
tools: composer:v2
24+
coverage: none
25+
26+
# Step 3: Install Vapor CLI
27+
- name: Install Vapor CLI
28+
run: composer global require laravel/vapor-cli
29+
30+
# Step 4: Log the branch being deployed (Optional enhancement)
31+
- name: Log Branch
32+
run: echo "Deploying branch ${{ github.ref }}"
33+
34+
# Step 5: Deploy to the Vapor Production Environment
35+
- name: Deploy to Production
36+
run: vapor deploy production
37+
env:
38+
VAPOR_API_TOKEN: ${{ secrets.VAPOR_API_TOKEN }}

backend/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
.env
99
.env.backup
1010
.env.production
11+
.env.staging
1112
.phpunit.result.cache
1213
Homestead.json
1314
Homestead.yaml

backend/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"laravel/framework": "^11.0",
1818
"laravel/sanctum": "^4.0",
1919
"laravel/tinker": "^2.8",
20+
"laravel/vapor-core": "^2.37",
2021
"league/flysystem-aws-s3-v3": "^3.0",
2122
"maatwebsite/excel": "^3.1",
2223
"nette/php-generator": "^4.0",

0 commit comments

Comments
 (0)