diff --git a/.firebaserc b/.firebaserc index 21d47aa4..bc8cc02e 100644 --- a/.firebaserc +++ b/.firebaserc @@ -4,4 +4,4 @@ "staging": "staging-zenuml-27954", "prod": "web-sequence-local" } -} \ No newline at end of file +} diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml deleted file mode 100644 index 0b030007..00000000 --- a/.github/workflows/deploy-staging.yml +++ /dev/null @@ -1,32 +0,0 @@ -# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: Deploy to Stage - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [16.x] - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - run: yarn install && yarn build - - run: yarn release - - name: Deploy to staging - if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' # This conditional will skip the step for Dependabot PRs - run: yarn deploy:staging --token ${{ secrets.FIREBASE_TOKEN }} - - name: Upload artifacts # Find artifacts under actions/jobs - uses: actions/upload-artifact@v3 - with: - name: chrome-extension - path: extension diff --git a/.github/workflows/firebase-hosting-merge-staging.yml b/.github/workflows/firebase-hosting-merge-staging.yml new file mode 100644 index 00000000..8a22a436 --- /dev/null +++ b/.github/workflows/firebase-hosting-merge-staging.yml @@ -0,0 +1,22 @@ +# This file was auto-generated by the Firebase CLI +# https://github.com/firebase/firebase-tools + +name: Deploy to Firebase Hosting on merge +'on': + push: + branches: + - master +jobs: + build_and_deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: yarn install && yarn build && yarn release + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: '${{ secrets.GITHUB_TOKEN }}' + firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_STAGING_ZENUML_27954 }}' + channelId: live + projectId: staging-zenuml-27954 + env: + FIREBASE_CLI_PREVIEWS: hostingchannels diff --git a/.github/workflows/firebase-hosting-pull-request-staging.yml b/.github/workflows/firebase-hosting-pull-request-staging.yml new file mode 100644 index 00000000..d3b90582 --- /dev/null +++ b/.github/workflows/firebase-hosting-pull-request-staging.yml @@ -0,0 +1,18 @@ +# This file was auto-generated by the Firebase CLI +# https://github.com/firebase/firebase-tools + +name: Deploy to Firebase Hosting on PR +'on': pull_request +jobs: + build_and_preview: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: yarn install && yarn build && yarn release + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: '${{ secrets.GITHUB_TOKEN }}' + firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_STAGING_ZENUML_27954 }}' + projectId: staging-zenuml-27954 + env: + FIREBASE_CLI_PREVIEWS: hostingchannels