From 2d6d2080fb4b69d73a8a4980a82f901b2cd9ab66 Mon Sep 17 00:00:00 2001 From: Rik Brown Date: Wed, 24 Sep 2025 17:38:00 -0400 Subject: [PATCH 1/3] Support archive --- dist/index.js | 12 +++++++++++- src/config.js | 5 +++++ src/vercel.js | 7 ++++++- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 5f111c02..f55213af 100644 --- a/dist/index.js +++ b/dist/index.js @@ -15984,6 +15984,10 @@ const context = { key: 'FORCE', type: 'boolean', default: false + }), + ARCHIVE: parser.getInput({ + key: 'ARCHIVE', + type: 'string', }) } @@ -16003,6 +16007,7 @@ const setDynamicVars = () => { context.ACTOR = process.env.ACTOR || context.USER context.IS_FORK = process.env.IS_FORK === 'true' || false context.TRIM_COMMIT_MESSAGE = process.env.TRIM_COMMIT_MESSAGE === 'true' || false + context.ARCHIVE = process.env.ARCHIVE || undefined return } @@ -16250,7 +16255,8 @@ const { BUILD_ENV, PREBUILT, WORKING_DIRECTORY, - FORCE + FORCE, + ARCHIVE } = __nccwpck_require__(4570) const init = () => { @@ -16279,6 +16285,10 @@ const init = () => { commandArguments.push('--force') } + if (ARCHIVE) { + commandArguments.push(`--archive=${ ARCHIVE }`) + } + if (commit) { const metadata = [ `githubCommitAuthorName=${ commit.authorName }`, diff --git a/src/config.js b/src/config.js index 2f2eb22b..ce7ae00f 100644 --- a/src/config.js +++ b/src/config.js @@ -98,6 +98,10 @@ const context = { key: 'FORCE', type: 'boolean', default: false + }), + ARCHIVE: parser.getInput({ + key: 'ARCHIVE', + type: 'string', }) } @@ -117,6 +121,7 @@ const setDynamicVars = () => { context.ACTOR = process.env.ACTOR || context.USER context.IS_FORK = process.env.IS_FORK === 'true' || false context.TRIM_COMMIT_MESSAGE = process.env.TRIM_COMMIT_MESSAGE === 'true' || false + context.ARCHIVE = process.env.ARCHIVE || undefined return } diff --git a/src/vercel.js b/src/vercel.js index 9370e8d9..0b182372 100644 --- a/src/vercel.js +++ b/src/vercel.js @@ -16,7 +16,8 @@ const { BUILD_ENV, PREBUILT, WORKING_DIRECTORY, - FORCE + FORCE, + ARCHIVE } = require('./config') const init = () => { @@ -45,6 +46,10 @@ const init = () => { commandArguments.push('--force') } + if (ARCHIVE) { + commandArguments.push(`--archive=${ ARCHIVE }`) + } + if (commit) { const metadata = [ `githubCommitAuthorName=${ commit.authorName }`, From b59624567d7a3e3579113fe4cbeea193d329e2c8 Mon Sep 17 00:00:00 2001 From: Rik Brown Date: Wed, 24 Sep 2025 17:42:32 -0400 Subject: [PATCH 2/3] Update action.yml and readme --- README.md | 1 + action.yml | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index c541f51f..e4ab7429 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,7 @@ Here are all the inputs [deploy-to-vercel-action](https://github.com/BetaHuhn/de | `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 +| `ARCHIVE` | Compress deployment code (e.g. "tgz") | **No** | N/A | ## 🛠️ Configuration diff --git a/action.yml b/action.yml index 7f062fd5..1a21d4c2 100644 --- a/action.yml +++ b/action.yml @@ -27,6 +27,10 @@ inputs: description: | Deploy a prebuilt Vercel Project (default: false). required: false + ARCHIVE: + description: | + Compress deployment code (e.g. "tgz"). + required: false GITHUB_DEPLOYMENT: description: | Create a deployment on GitHub (default: true). From 7e86d64aa4bcd5a99823bd32506a2d9a41b0881e Mon Sep 17 00:00:00 2001 From: Rik Brown Date: Thu, 25 Sep 2025 11:14:27 -0400 Subject: [PATCH 3/3] lint --- src/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.js b/src/config.js index ce7ae00f..a15405b8 100644 --- a/src/config.js +++ b/src/config.js @@ -101,7 +101,7 @@ const context = { }), ARCHIVE: parser.getInput({ key: 'ARCHIVE', - type: 'string', + type: 'string' }) }