Skip to content

Commit

Permalink
🔨 fixes from BetaHuhn#232
Browse files Browse the repository at this point in the history
  • Loading branch information
mountainash committed Mar 11, 2024
1 parent 2d43acb commit b3cde51
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32064,7 +32064,7 @@ const setDynamicVars = () => {
context.ACTOR = github.context.actor
context.REF = github.context.ref
context.SHA = github.context.sha
context.BRANCH = github.context.ref.substring(11)
context.BRANCH = github.context.ref.substring('refs/heads/'.length)
}
}

Expand Down Expand Up @@ -32284,7 +32284,7 @@ const {
SHA,
USER,
REPOSITORY,
REF,
BRANCH,
TRIM_COMMIT_MESSAGE,
BUILD_ENV,
PREBUILT,
Expand All @@ -32300,7 +32300,7 @@ const init = () => {
let deploymentUrl

const deploy = async (commit) => {
let commandArguments = [ `--token=${ VERCEL_TOKEN }` ]
let commandArguments = [ `--token=${ VERCEL_TOKEN }`, 'deploy' ]

if (VERCEL_SCOPE) {
commandArguments.push(`--scope=${ VERCEL_SCOPE }`)
Expand All @@ -32326,7 +32326,7 @@ const init = () => {
`githubCommitMessage=${ TRIM_COMMIT_MESSAGE ? commit.commitMessage.split(/\r?\n/)[0] : commit.commitMessage }`,
`githubCommitOrg=${ USER }`,
`githubCommitRepo=${ REPOSITORY }`,
`githubCommitRef=${ REF }`,
`githubCommitRef=${ BRANCH }`,
`githubCommitSha=${ SHA }`,
`githubOrg=${ USER }`,
`githubRepo=${ REPOSITORY }`,
Expand All @@ -32345,7 +32345,7 @@ const init = () => {
}

core.info('Starting deploy with Vercel â–² CLI')
const output = await execCmd('vercel deploy', commandArguments, WORKING_DIRECTORY)
const output = await execCmd('vercel', commandArguments, WORKING_DIRECTORY)
const match = output.match(/(?<=https:\/\/)(.*)/g)
const parsed = match ? match[0] : null

Expand All @@ -32363,7 +32363,7 @@ const init = () => {
commandArguments.push(`--scope=${ VERCEL_SCOPE }`)
}

return await execCmd('vercel deploy', commandArguments, WORKING_DIRECTORY)
return await execCmd('vercel', commandArguments, WORKING_DIRECTORY)
}

const getDeployment = async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const setDynamicVars = () => {
context.ACTOR = github.context.actor
context.REF = github.context.ref
context.SHA = github.context.sha
context.BRANCH = github.context.ref.substring(11)
context.BRANCH = github.context.ref.substring('refs/heads/'.length)
}
}

Expand Down
10 changes: 5 additions & 5 deletions src/vercel.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const {
SHA,
USER,
REPOSITORY,
REF,
BRANCH,
TRIM_COMMIT_MESSAGE,
BUILD_ENV,
PREBUILT,
Expand All @@ -26,7 +26,7 @@ const init = () => {
let deploymentUrl

const deploy = async (commit) => {
let commandArguments = [ `--token=${ VERCEL_TOKEN }` ]
let commandArguments = [ `--token=${ VERCEL_TOKEN }`, 'deploy' ]

if (VERCEL_SCOPE) {
commandArguments.push(`--scope=${ VERCEL_SCOPE }`)
Expand All @@ -52,7 +52,7 @@ const init = () => {
`githubCommitMessage=${ TRIM_COMMIT_MESSAGE ? commit.commitMessage.split(/\r?\n/)[0] : commit.commitMessage }`,
`githubCommitOrg=${ USER }`,
`githubCommitRepo=${ REPOSITORY }`,
`githubCommitRef=${ REF }`,
`githubCommitRef=${ BRANCH }`,
`githubCommitSha=${ SHA }`,
`githubOrg=${ USER }`,
`githubRepo=${ REPOSITORY }`,
Expand All @@ -71,7 +71,7 @@ const init = () => {
}

core.info('Starting deploy with Vercel â–² CLI')
const output = await execCmd('vercel deploy', commandArguments, WORKING_DIRECTORY)
const output = await execCmd('vercel', commandArguments, WORKING_DIRECTORY)
const match = output.match(/(?<=https:\/\/)(.*)/g)
const parsed = match ? match[0] : null

Expand All @@ -89,7 +89,7 @@ const init = () => {
commandArguments.push(`--scope=${ VERCEL_SCOPE }`)
}

return await execCmd('vercel deploy', commandArguments, WORKING_DIRECTORY)
return await execCmd('vercel', commandArguments, WORKING_DIRECTORY)
}

const getDeployment = async () => {
Expand Down

0 comments on commit b3cde51

Please sign in to comment.