@@ -4083,22 +4083,26 @@ const run = async () => {
40834083
40844084 // check only deployment settings
40854085 let deployOnly = process . env . function === 'true' ? 'function' : '' ;
4086- deployOnly +=
4087- process . env . hosting === 'true'
4088- ? `${ deployOnly !== '' ? ' ' : '' } hosting`
4089- : '' ;
4086+ deployOnly += deployOnly === '' ? '' : ' ' ;
4087+ deployOnly += process . env . hosting === 'true' ? `hosting` : '' ;
4088+
4089+ let cmd = `firebase deploy -m ${ process . env . GITHUB_SHA } ` ;
4090+ cmd += config ? ` --config ${ config } ` : ' ' ;
4091+ cmd += ` --project ${ project } ` ;
4092+ cmd += deployOnly !== '' ? ` --only ${ deployOnly } ` : '' ;
40904093
40914094 try {
4092- // attempt to run firebase deploy, and throw an error if failed
4093- await _actions_exec__WEBPACK_IMPORTED_MODULE_1__ . exec (
4094- `firebase deploy -m ${ process . env . GITHUB_SHA } ${
4095- config ? `--config ${ config } ` : ''
4096- } --project ${ project } ${
4097- deployOnly !== '' ? ` --only ${ deployOnly } ` : ''
4098- } `
4099- ) ;
4095+ // attempt to run firebase deploy, and run with debug mode if failed
4096+ await _actions_exec__WEBPACK_IMPORTED_MODULE_1__ . exec ( cmd ) ;
41004097 } catch ( error ) {
4101- _actions_core__WEBPACK_IMPORTED_MODULE_0__ . setFailed ( `An error occured while deploying to Firebase: ${ error } ` ) ;
4098+ _actions_core__WEBPACK_IMPORTED_MODULE_0__ . error ( `An error occured while deploying to Firebase: ${ error } . Retrying with debug mode enabled ...` ) ;
4099+
4100+ // attempt to run firebase deploy with debug mode
4101+ try {
4102+ await _actions_exec__WEBPACK_IMPORTED_MODULE_1__ . exec ( `${ cmd } --debug` ) ;
4103+ } catch ( error ) {
4104+ _actions_core__WEBPACK_IMPORTED_MODULE_0__ . setFailed ( `An error occured while deploying to Firebase: ${ error } ` ) ;
4105+ }
41024106 }
41034107} ;
41044108
0 commit comments