Skip to content

Commit e29506d

Browse files
committed
[php] update main example, add 7.4-8.2 examples
1 parent 5280375 commit e29506d

21 files changed

+149
-51
lines changed

.github/workflows/deploy-php-7.4.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Deploy php 7.4
2+
3+
on:
4+
push:
5+
paths:
6+
- 'php-7.4/**'
7+
branches:
8+
- "master"
9+
10+
concurrency:
11+
group: php-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
deploy:
16+
name: Deploy
17+
uses: ./.github/workflows/vercel.yml
18+
secrets: inherit
19+
with:
20+
projectId: "prj_O8ddYFcAyG1ihzTZCFxA8xXPrtEe"
21+
projectPath: "php-7.4"

.github/workflows/deploy-php-8.0.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Deploy php 8.0
2+
3+
on:
4+
push:
5+
paths:
6+
- 'php-8.0/**'
7+
branches:
8+
- "master"
9+
10+
concurrency:
11+
group: php-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
deploy:
16+
name: Deploy
17+
uses: ./.github/workflows/vercel.yml
18+
secrets: inherit
19+
with:
20+
projectId: "prj_WlfX8kyVFZxsKSI26LHBLLtzSNB1"
21+
projectPath: "php-8.0"

.github/workflows/deploy-php-8.1.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Deploy php 8.1
2+
3+
on:
4+
push:
5+
paths:
6+
- 'php-8.1/**'
7+
branches:
8+
- "master"
9+
10+
concurrency:
11+
group: php-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
deploy:
16+
name: Deploy
17+
uses: ./.github/workflows/vercel.yml
18+
secrets: inherit
19+
with:
20+
projectId: "prj_jsuaId53jLmpXeuhdXAdqrv97aO3"
21+
projectPath: "php-8.1"

.github/workflows/deploy-php-8.2.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Deploy php 8.2
2+
3+
on:
4+
push:
5+
paths:
6+
- 'php-8.2/**'
7+
branches:
8+
- "master"
9+
10+
concurrency:
11+
group: php-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
deploy:
16+
name: Deploy
17+
uses: ./.github/workflows/vercel.yml
18+
secrets: inherit
19+
with:
20+
projectId: "prj_wXRdr49SVDdikjwyTZ7V05tx76wm"
21+
projectPath: "php-8.2"

.github/workflows/deploy-php.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy avatarless
1+
name: Deploy php
22

33
on:
44
push:
@@ -13,7 +13,7 @@ concurrency:
1313

1414
jobs:
1515
deploy:
16-
name: Deploy php
16+
name: Deploy
1717
uses: ./.github/workflows/vercel.yml
1818
secrets: inherit
1919
with:

.github/workflows/main.yml

-39
This file was deleted.

php-7.4/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Vercel
2+
.vercel

php-7.4/api/index.php

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
3+
phpinfo();

php-7.4/vercel.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"functions": {
3+
"api/index.php": {
4+
"runtime": "[email protected]"
5+
}
6+
},
7+
"routes": [
8+
{ "src": "/(.*)", "dest": "/api/index.php" }
9+
]
10+
}

php-8.0/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Vercel
2+
.vercel

php-8.0/api/index.php

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
3+
phpinfo();

php-8.0/vercel.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"functions": {
3+
"api/index.php": {
4+
"runtime": "[email protected]"
5+
}
6+
},
7+
"routes": [
8+
{ "src": "/(.*)", "dest": "/api/index.php" }
9+
]
10+
}

php-8.1/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Vercel
2+
.vercel

php-8.1/api/index.php

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
3+
phpinfo();

php-8.1/vercel.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"functions": {
3+
"api/index.php": {
4+
"runtime": "[email protected]"
5+
}
6+
},
7+
"routes": [
8+
{ "src": "/(.*)", "dest": "/api/index.php" }
9+
]
10+
}

php-8.2/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Vercel
2+
.vercel

php-8.2/api/index.php

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
3+
phpinfo();

php-8.2/vercel.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"functions": {
3+
"api/index.php": {
4+
"runtime": "[email protected]"
5+
}
6+
},
7+
"routes": [
8+
{ "src": "/(.*)", "dest": "/api/index.php" }
9+
]
10+
}

php/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
<div>
1414
<div class="text-5xl font-bold">
1515
Vercel + PHP
16-
<a class="inline-block" href="https://vercel.com/new/project?template=https://github.com/juicyfx/vercel-examples/tree/master/php">
16+
<a class="inline-block" href="https://vercel.com/new/project?template=https://github.com/vercel-community/php/tree/master">
1717
<img src="https://vercel.com/button" alt="Deploy to Vercel" />
1818
</a>
1919
</div>
2020

2121
<p class="text-xl my-10">Use the <strong>deploy</strong> button or follow these steps.</p>
2222

2323
<ol class="list-decimal my-4 mx-8 text-normal">
24-
<li class="py-2">Clone repository <code class="bg-pink-600 rounded rounded-sm text-white p-2">git clone [email protected]:juicyfx/vercel-examples.git</code></li>
24+
<li class="py-2">Clone repository <code class="bg-pink-600 rounded rounded-sm text-white p-2">git clone [email protected]:vercel-community/php.git</code></li>
2525
<li class="py-2">Switch to <code>/php</code> folder and run <code class="underline font-bold">vercel</code></li>
2626
<li class="py-2">Open generated <strong>*.vercel.app</strong> domain [<a class="text-pink-800" href="https://php.vercel.app">demo</a>]</li>
2727
<li class="py-2">Discover <strong>*.vercel.app/api/</strong> PHP functions [<a class="text-pink-800" href="https://php.vercel.app/api/">demo</a>] </li>

php/now.json

-7
This file was deleted.

php/vercel.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"functions": {
33
"api/index.php": {
4-
"runtime": "vercel-php@0.4.0"
4+
"runtime": "vercel-php@0.5.2"
55
}
66
}
77
}

0 commit comments

Comments
 (0)