Skip to content

Commit 39ad2e1

Browse files
authoredMar 16, 2023
✨ Add prebuilt option (#302)
* feat: add prebuilt option * add PREBUILT option to the metadata file
1 parent 28a43ec commit 39ad2e1

File tree

5 files changed

+25
-0
lines changed

5 files changed

+25
-0
lines changed
 

‎README.md

+1
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ Here are all the inputs [deploy-to-vercel-action](https://github.com/BetaHuhn/de
9595
| `BUILD_ENV` | Provide environment variables to the build step | **No** | N/A |
9696
| `WORKING_DIRECTORY` | Working directory for the Vercel CLI | **No** | N/A |
9797
| `FORCE` | Used to skip the build cache. | **No** | false
98+
| `PREBUILT` | Deploy a prebuilt Vercel Project. | **No** | false
9899

99100
## 🛠️ Configuration
100101

‎action.yml

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ inputs:
2323
description: |
2424
Create a production deployment (default: true, false for PR deployments).
2525
required: false
26+
PREBUILT:
27+
description: |
28+
Deploy a prebuilt Vercel Project (default: false).
29+
required: false
2630
GITHUB_DEPLOYMENT:
2731
description: |
2832
Create a deployment on GitHub (default: true).

‎dist/index.js

+10
Original file line numberDiff line numberDiff line change
@@ -15973,6 +15973,11 @@ const context = {
1597315973
key: 'BUILD_ENV',
1597415974
type: 'array'
1597515975
}),
15976+
PREBUILT: parser.getInput({
15977+
key: 'PREBUILT',
15978+
type: 'boolean',
15979+
default: false
15980+
}),
1597615981
RUNNING_LOCAL: process.env.RUNNING_LOCAL === 'true',
1597715982
FORCE: parser.getInput({
1597815983
key: 'FORCE',
@@ -16242,6 +16247,7 @@ const {
1624216247
REF,
1624316248
TRIM_COMMIT_MESSAGE,
1624416249
BUILD_ENV,
16250+
PREBUILT,
1624516251
WORKING_DIRECTORY,
1624616252
FORCE
1624716253
} = __nccwpck_require__(4570)
@@ -16264,6 +16270,10 @@ const init = () => {
1626416270
commandArguments.push('--prod')
1626516271
}
1626616272

16273+
if (PREBUILT) {
16274+
commandArguments.push('--prebuilt')
16275+
}
16276+
1626716277
if (FORCE) {
1626816278
commandArguments.push('--force')
1626916279
}

‎src/config.js

+5
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ const context = {
8888
key: 'BUILD_ENV',
8989
type: 'array'
9090
}),
91+
PREBUILT: parser.getInput({
92+
key: 'PREBUILT',
93+
type: 'boolean',
94+
default: false
95+
}),
9196
RUNNING_LOCAL: process.env.RUNNING_LOCAL === 'true',
9297
FORCE: parser.getInput({
9398
key: 'FORCE',

‎src/vercel.js

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const {
1414
REF,
1515
TRIM_COMMIT_MESSAGE,
1616
BUILD_ENV,
17+
PREBUILT,
1718
WORKING_DIRECTORY,
1819
FORCE
1920
} = require('./config')
@@ -36,6 +37,10 @@ const init = () => {
3637
commandArguments.push('--prod')
3738
}
3839

40+
if (PREBUILT) {
41+
commandArguments.push('--prebuilt')
42+
}
43+
3944
if (FORCE) {
4045
commandArguments.push('--force')
4146
}

0 commit comments

Comments
 (0)
Please sign in to comment.