From 24a3ae5d22cb5f97fa06ccd2ae3736852d492610 Mon Sep 17 00:00:00 2001 From: MrCoder Date: Sat, 18 Nov 2023 11:39:24 +1100 Subject: [PATCH] Updated deploy-prod. --- .github/workflows/deploy-prod.yml | 60 ++++++++++++++++--------------- 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index d801e7fd..6764f03c 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -16,33 +16,37 @@ jobs: matrix: node-version: [16.x] + build_and_deploy: + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - run: yarn install && yarn build - - run: yarn release - - run: yarn deploy:prod --token ${{ secrets.FIREBASE_TOKEN }} - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GH_ACTION_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GH_ACTION_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./extension.zip - asset_name: chrome-extension.zip - asset_content_type: application/zip + - 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_WEB_SEQUENCE_LOCAL }}' + channelId: live + projectId: web-sequence-local + env: + FIREBASE_CLI_PREVIEWS: hostingchannels + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GH_ACTION_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GH_ACTION_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./extension.zip + asset_name: chrome-extension.zip + asset_content_type: application/zip