mirror of
https://github.com/actions/deploy-pages.git
synced 2025-12-08 16:16:16 +00:00
Merge pull request #24 from actions/decouple-telemetry
Decouple telemetry API call from main action
This commit is contained in:
@@ -3,8 +3,10 @@ description: 'A GitHub Action to deploy an artifact to GitHub Pages'
|
||||
runs:
|
||||
using: 'node16'
|
||||
main: 'dist/index.js'
|
||||
pre: 'pre/index.js'
|
||||
inputs:
|
||||
emit_telemetry:
|
||||
description: 'Should this action only emit build telemetry instead of deploying the build artifact?'
|
||||
required: false
|
||||
token:
|
||||
description: 'GitHub token'
|
||||
default: ${{ github.token }}
|
||||
|
||||
10
dist/index.js
vendored
10
dist/index.js
vendored
@@ -7473,7 +7473,15 @@ process.on('SIGINT', cancelHandler)
|
||||
process.on('SIGTERM', cancelHandler)
|
||||
|
||||
// Main
|
||||
main().then(() => __nccwpck_require__(9557))
|
||||
const emitTelemetry = core.getInput("emit_telemetry")
|
||||
if (emitTelemetry === "true") {
|
||||
__nccwpck_require__(9557)
|
||||
} else if (emitTelemetry === "false") {
|
||||
main()
|
||||
} else {
|
||||
// If emit_telemetry is not set, that indicates an older version of the dynamic workflow that doesn't separate telemetry from deployment
|
||||
main().then(() => __nccwpck_require__(9557))
|
||||
}
|
||||
|
||||
})();
|
||||
|
||||
|
||||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
10
src/index.js
10
src/index.js
@@ -52,4 +52,12 @@ process.on('SIGINT', cancelHandler)
|
||||
process.on('SIGTERM', cancelHandler)
|
||||
|
||||
// Main
|
||||
main().then(() => require('./pre'))
|
||||
const emitTelemetry = core.getInput("emit_telemetry")
|
||||
if (emitTelemetry === "true") {
|
||||
require('./pre')
|
||||
} else if (emitTelemetry === "false") {
|
||||
main()
|
||||
} else {
|
||||
// If emit_telemetry is not set, that indicates an older version of the dynamic workflow that doesn't separate telemetry from deployment
|
||||
main().then(() => require('./pre'))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user