File tree Expand file tree Collapse file tree 4 files changed +15
-7
lines changed Expand file tree Collapse file tree 4 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -21,4 +21,5 @@ outputs:
21
21
description : ' The total time taken to complete the deployment process.'
22
22
runs :
23
23
using : ' node20'
24
- main : ' dist/main'
24
+ pre : ' npm build'
25
+ main : ' dist/index.js'
Original file line number Diff line number Diff line change 1
- import { exec } from "child_process" ;
1
+ import * as child from "child_process" ;
2
2
3
3
export class Slack {
4
4
webhookUrl : string ;
@@ -9,7 +9,7 @@ export class Slack {
9
9
10
10
send ( payload : string ) {
11
11
return new Promise ( ( resolve , reject ) => {
12
- exec (
12
+ child . exec (
13
13
`curl -X POST -H 'Content-type: application/json' --data '${ payload } '` ,
14
14
( error , stdout ) => {
15
15
if ( error ) {
Original file line number Diff line number Diff line change 1
- import { exec } from 'child_process' ;
1
+ import * as child from 'child_process' ;
2
2
3
3
export class Vercel {
4
4
token : string ;
@@ -9,7 +9,7 @@ export class Vercel {
9
9
10
10
pull ( ) {
11
11
return new Promise ( ( resolve , reject ) => {
12
- exec (
12
+ child . exec (
13
13
`npx vercel build --token=${ this . token } --yes` ,
14
14
( error , stdout ) => {
15
15
if ( error ) {
@@ -25,7 +25,7 @@ export class Vercel {
25
25
26
26
build ( ) {
27
27
return new Promise ( ( resolve , reject ) => {
28
- exec (
28
+ child . exec (
29
29
`npx vercel build --token=${ this . token } ` ,
30
30
( error , stdout ) => {
31
31
if ( error ) {
@@ -41,7 +41,7 @@ export class Vercel {
41
41
42
42
deploy ( ) {
43
43
return new Promise ( ( resolve , reject ) => {
44
- exec (
44
+ child . exec (
45
45
`npx vercel --token=${ this . token } --prod` ,
46
46
( error , stdout ) => {
47
47
if ( error ) {
Original file line number Diff line number Diff line change @@ -11,5 +11,12 @@ export default defineConfig({
11
11
name : 'VercelDeployWithSlack' ,
12
12
fileName : 'vercel-deploy-with-slack'
13
13
} ,
14
+ outDir : 'dist' ,
15
+ rollupOptions : {
16
+ treeshake : true ,
17
+ output : {
18
+ entryFileNames : 'index.js' ,
19
+ } ,
20
+ } ,
14
21
} ,
15
22
} ) ;
You can’t perform that action at this time.
0 commit comments