@@ -16,6 +16,10 @@ var zlib = require('zlib');
16
16
17
17
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : { } ;
18
18
19
+ function getDefaultExportFromCjs ( x ) {
20
+ return x && x . __esModule && Object . prototype . hasOwnProperty . call ( x , 'default' ) ? x [ 'default' ] : x ;
21
+ }
22
+
19
23
function getAugmentedNamespace ( n ) {
20
24
if ( n . __esModule ) return n ;
21
25
var a = Object . defineProperty ( { } , '__esModule' , { value : true } ) ;
@@ -416,6 +420,8 @@ exports.getState = getState;
416
420
//# sourceMappingURL=core.js.map
417
421
} ) ;
418
422
423
+ var core$1 = /*@__PURE__ */ getDefaultExportFromCjs ( core ) ;
424
+
419
425
var context = createCommonjsModule ( function ( module , exports ) {
420
426
Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
421
427
exports . Context = void 0 ;
@@ -6005,47 +6011,35 @@ exports.getOctokit = getOctokit;
6005
6011
//# sourceMappingURL=github.js.map
6006
6012
} ) ;
6007
6013
6014
+ var github$1 = /*@__PURE__ */ getDefaultExportFromCjs ( github ) ;
6015
+
6008
6016
async function run ( ) {
6009
6017
try {
6010
- const token = core . getInput ( "token" ) ;
6011
- const repo = core . getInput ( "repo" ) ;
6012
- const branch = core . getInput ( "branch" ) ;
6013
- const docs_path = core . getInput ( "docs_path" ) ;
6014
- const pkg_path = core . getInput ( "pkg_path" ) ;
6018
+ const token = core$1 . getInput ( "token" ) ;
6019
+ const repo = core$1 . getInput ( "repo" ) ;
6020
+ const branch = core$1 . getInput ( "branch" ) ;
6021
+ const docs_path = core$1 . getInput ( "docs_path" ) ;
6022
+ const pkg_path = core$1 . getInput ( "pkg_path" ) ;
6015
6023
6016
6024
console . log ( token . length ) ;
6017
6025
6018
- const octokit = github . getOctokit ( token ) ;
6019
- const dispatchResp = await octokit . request (
6020
- "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches" ,
6021
- {
6022
- owner : "sveltejs" ,
6023
- repo : "sites" ,
6024
- workflow_id : "docs-deploy-trigger.yml" ,
6025
- ref : "master" ,
6026
- inputs : {
6027
- repo,
6028
- branch,
6029
- docs_path,
6030
- pkg_path,
6031
- } ,
6032
- }
6033
- ) ;
6034
- // const dispatchResp = await octokit.rest.actions.createWorkflowDispatch({
6035
- // owner: "sveltejs",
6036
- // repo: "sites",
6037
- // workflow_id: "docs-deploy-trigger.yml",
6038
- // ref: "master",
6039
- // inputs: {
6040
- // repo,
6041
- // branch,
6042
- // docs_path,
6043
- // pkg_path,
6044
- // },
6045
- // });
6046
- core . info ( `API response status: ${ dispatchResp . status } 🚀` ) ;
6026
+ const octokit = github$1 . getOctokit ( token ) ;
6027
+
6028
+ const dispatchResp = await octokit . rest . actions . createWorkflowDispatch ( {
6029
+ owner : "sveltejs" ,
6030
+ repo : "sites" ,
6031
+ workflow_id : "docs-deploy-trigger.yml" ,
6032
+ ref : "master" ,
6033
+ inputs : {
6034
+ repo,
6035
+ branch,
6036
+ docs_path,
6037
+ pkg_path,
6038
+ } ,
6039
+ } ) ;
6040
+ core$1 . info ( `API response status: ${ dispatchResp . status } 🚀` ) ;
6047
6041
} catch ( error ) {
6048
- core . setFailed ( error . message ) ;
6042
+ core$1 . setFailed ( error . message ) ;
6049
6043
}
6050
6044
}
6051
6045
0 commit comments