diff --git a/.github/workflows/test-env-deploy.yml b/.github/workflows/test-env-deploy.yml index fcd7998..cabf9ac 100644 --- a/.github/workflows/test-env-deploy.yml +++ b/.github/workflows/test-env-deploy.yml @@ -68,7 +68,7 @@ jobs: - name: Deploy Script id: clasp-deploy - if: ${{env.TEST_DEPLOYMENT_ID && (github.event_name == 'release' || (github.event_name == 'push' && github.ref == 'refs/heads/test'))}} - run: clasp deploy -i "$TEST_DEPLOYMENT_ID" -d ${{github.run_number}} + if: github.ref == 'refs/heads/test' + run: clasp deploy -i "${{ secrets.TEST_DEPLOYMENT_ID }}" -d ${{github.run_number}} env: TEST_SCRIPT_ID: ${{ secrets.TEST_SCRIPT_ID }} \ No newline at end of file diff --git a/src/server/lib/initializeApp.ts b/src/server/lib/initializeApp.ts new file mode 100644 index 0000000..cd6781f --- /dev/null +++ b/src/server/lib/initializeApp.ts @@ -0,0 +1,27 @@ +import { AppConfigurationType } from "../../types/schemas"; + +/** + * Initialize the app + */ +function initializeApp(): Object { + const deployingUserEmail = Session.getEffectiveUser().getEmail(); + + let newAppConfig: AppConfigurationType = { + appName: "My App", + deployingUserEmail: deployingUserEmail, + viewConfigurations: [], + dataSourceConfigurations: [], + admins: [], + }; + + + const scriptPropertiesService = PropertiesService.getScriptProperties(); + scriptPropertiesService.setProperty( + "appConfiguration", + JSON.stringify(newAppConfig) + ); + + let response = { success: true }; + + return JSON.parse(JSON.stringify(response)); + } \ No newline at end of file