Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

replace deprecated 'publish' with 'deploy' #101

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ try {
$ export CLOUDFLARE_ACCOUNT_ID="${accountId}"
}

$$ npx wrangler@${wranglerVersion} pages publish "${directory}" --project-name="${projectName}" --branch="${branch}"
if (wranglerVersion < 3) {
$$ npx wrangler@${wranglerVersion} pages publish "${directory}" --project-name="${projectName}" --branch="${branch}"
} else {
$$ npx wrangler@${wranglerVersion} pages deploy "${directory}" --project-name="${projectName}" --branch="${branch}"
}
`;

const response = await fetch(
Expand Down