Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
hunghg255 committed Nov 9, 2023
1 parent 832cde3 commit ae2ef9a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.js

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions src/deploy/branch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,19 @@ export const deployBranch = async ({ surgeToken, dist, failOnError }: any) => {
core.info(`Build time: ${duration} seconds`);
core.info(`Deploy to ${url}`);
core.setSecret(surgeToken);
} catch (error: any) {
fail?.(error);
}

try {
await execSurgeCommand({
command: ['surge', `./${dist}`, '--token', surgeToken, '--cleanup'],
});
} catch (error: any) {
fail?.(error);
}

try {
await execSurgeCommand({
command: ['surge', `./${dist}`, url, '--token', surgeToken],
});
Expand Down

0 comments on commit ae2ef9a

Please sign in to comment.