@@ -4056,29 +4056,24 @@ var __webpack_exports__ = {};
40564056
40574057
40584058const run = async ( ) => {
4059- try {
4060- // preflight check before starting the actions
4061- const project = _actions_core__WEBPACK_IMPORTED_MODULE_0__ . getInput ( 'project' ) ;
4062- if ( ! project ) {
4063- _actions_core__WEBPACK_IMPORTED_MODULE_0__ . setFailed ( 'The Firebase project is missing from the worflow file' ) ;
4064- return ;
4065- }
4066-
4067- if ( ! process . env . FIREBASE_TOKEN ) {
4068- _actions_core__WEBPACK_IMPORTED_MODULE_0__ . setFailed ( 'The FIREBASE_TOKEN is missing' ) ;
4069- return ;
4070- }
4071-
4072- // check if we receive a custom path for firebase.json
4073- const config = _actions_core__WEBPACK_IMPORTED_MODULE_0__ . getInput ( 'config' ) ;
4074-
4075- // check only deployment settings
4076- let deployOnly = _actions_core__WEBPACK_IMPORTED_MODULE_0__ . getInput ( 'function' ) === 'true' ? 'function' : '' ;
4077- deployOnly +=
4078- _actions_core__WEBPACK_IMPORTED_MODULE_0__ . getInput ( 'hosting' ) === 'true'
4079- ? `${ deployOnly !== '' ? ' ' : '' } hosting`
4080- : '' ;
4059+ // preflight check before starting the actions
4060+ const project = _actions_core__WEBPACK_IMPORTED_MODULE_0__ . getInput ( 'project' ) ;
4061+ if ( ! project ) {
4062+ _actions_core__WEBPACK_IMPORTED_MODULE_0__ . setFailed ( 'The Firebase project is missing from the worflow file' ) ;
4063+ return ;
4064+ }
4065+
4066+ // check if we receive a custom path for firebase.json
4067+ const config = _actions_core__WEBPACK_IMPORTED_MODULE_0__ . getInput ( 'config' ) ;
4068+
4069+ // check only deployment settings
4070+ let deployOnly = _actions_core__WEBPACK_IMPORTED_MODULE_0__ . getInput ( 'function' ) === 'true' ? 'function' : '' ;
4071+ deployOnly +=
4072+ _actions_core__WEBPACK_IMPORTED_MODULE_0__ . getInput ( 'hosting' ) === 'true'
4073+ ? `${ deployOnly !== '' ? ' ' : '' } hosting`
4074+ : '' ;
40814075
4076+ try {
40824077 // installing firebase tools
40834078 await _actions_exec__WEBPACK_IMPORTED_MODULE_1__ . exec ( 'npm i -g firebase-tools' ) ;
40844079
@@ -4092,21 +4087,7 @@ const run = async () => {
40924087 } `
40934088 ) ;
40944089 } catch ( error ) {
4095- _actions_core__WEBPACK_IMPORTED_MODULE_0__ . error (
4096- `An error occured while deploying to Firebase: ${ error } . Retrying with debug mode enabled ...`
4097- ) ;
4098-
4099- try {
4100- await _actions_exec__WEBPACK_IMPORTED_MODULE_1__ . exec (
4101- `firebase deploy -m ${ process . env . GITHUB_SHA } ${
4102- config ? `--config ${ config } ` : ''
4103- } --project ${ project } ${
4104- deployOnly !== '' ? ` --only ${ deployOnly } ` : ''
4105- } --debug`
4106- ) ;
4107- } catch ( error ) {
4108- _actions_core__WEBPACK_IMPORTED_MODULE_0__ . setFailed ( `An error occured while deploying to Firebase: ${ error } ` ) ;
4109- }
4090+ _actions_core__WEBPACK_IMPORTED_MODULE_0__ . error ( `An error occured while deploying to Firebase: ${ error } ` ) ;
41104091 }
41114092} ;
41124093
0 commit comments