Skip to content

Commit

Permalink
✨ Add prebuilt option (#302)
Browse files Browse the repository at this point in the history
* feat: add prebuilt option

* add PREBUILT option to the metadata file
  • Loading branch information
Merott authored Mar 16, 2023
1 parent 28a43ec commit 39ad2e1
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ Here are all the inputs [deploy-to-vercel-action](https://github.com/BetaHuhn/de
| `BUILD_ENV` | Provide environment variables to the build step | **No** | N/A |
| `WORKING_DIRECTORY` | Working directory for the Vercel CLI | **No** | N/A |
| `FORCE` | Used to skip the build cache. | **No** | false
| `PREBUILT` | Deploy a prebuilt Vercel Project. | **No** | false

## 🛠️ Configuration

Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ inputs:
description: |
Create a production deployment (default: true, false for PR deployments).
required: false
PREBUILT:
description: |
Deploy a prebuilt Vercel Project (default: false).
required: false
GITHUB_DEPLOYMENT:
description: |
Create a deployment on GitHub (default: true).
Expand Down
10 changes: 10 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15973,6 +15973,11 @@ const context = {
key: 'BUILD_ENV',
type: 'array'
}),
PREBUILT: parser.getInput({
key: 'PREBUILT',
type: 'boolean',
default: false
}),
RUNNING_LOCAL: process.env.RUNNING_LOCAL === 'true',
FORCE: parser.getInput({
key: 'FORCE',
Expand Down Expand Up @@ -16242,6 +16247,7 @@ const {
REF,
TRIM_COMMIT_MESSAGE,
BUILD_ENV,
PREBUILT,
WORKING_DIRECTORY,
FORCE
} = __nccwpck_require__(4570)
Expand All @@ -16264,6 +16270,10 @@ const init = () => {
commandArguments.push('--prod')
}

if (PREBUILT) {
commandArguments.push('--prebuilt')
}

if (FORCE) {
commandArguments.push('--force')
}
Expand Down
5 changes: 5 additions & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ const context = {
key: 'BUILD_ENV',
type: 'array'
}),
PREBUILT: parser.getInput({
key: 'PREBUILT',
type: 'boolean',
default: false
}),
RUNNING_LOCAL: process.env.RUNNING_LOCAL === 'true',
FORCE: parser.getInput({
key: 'FORCE',
Expand Down
5 changes: 5 additions & 0 deletions src/vercel.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const {
REF,
TRIM_COMMIT_MESSAGE,
BUILD_ENV,
PREBUILT,
WORKING_DIRECTORY,
FORCE
} = require('./config')
Expand All @@ -36,6 +37,10 @@ const init = () => {
commandArguments.push('--prod')
}

if (PREBUILT) {
commandArguments.push('--prebuilt')
}

if (FORCE) {
commandArguments.push('--force')
}
Expand Down

0 comments on commit 39ad2e1

Please sign in to comment.