From 0c5aba20c098945b81876f1e567d6a85d2413173 Mon Sep 17 00:00:00 2001 From: Roger <50648015+RogerLamTd@users.noreply.github.com> Date: Wed, 27 Mar 2024 01:59:17 -0700 Subject: [PATCH] ci(blobstorage): deploy blobs swagger api (#16531) --- .github/workflows/blobstorage-preview.yml | 33 ++++++++++++++++++++ .github/workflows/blobstorage-production.yml | 30 ++++++++++++++++++ .gitignore | 1 + 3 files changed, 64 insertions(+) create mode 100644 .github/workflows/blobstorage-preview.yml create mode 100644 .github/workflows/blobstorage-production.yml diff --git a/.github/workflows/blobstorage-preview.yml b/.github/workflows/blobstorage-preview.yml new file mode 100644 index 0000000000..57db84c9c1 --- /dev/null +++ b/.github/workflows/blobstorage-preview.yml @@ -0,0 +1,33 @@ +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_BLOBSTORAGE }} + +on: + push: + branches-ignore: + - main + - release-please-* + paths: + - "packages/blobstorage/**" + +jobs: + Deploy-Preview: + runs-on: [taiko-runner] + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install pnpm dependencies + uses: ./.github/actions/install-pnpm-dependencies + + - name: Install Vercel CLI + run: pnpm add --global vercel@latest + + - name: Pull Vercel Environment Information + run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} + + - name: Build Project Artifacts + run: vercel build --token=${{ secrets.VERCEL_TOKEN }} + + - name: Deploy Project Artifacts to Vercel + run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} diff --git a/.github/workflows/blobstorage-production.yml b/.github/workflows/blobstorage-production.yml new file mode 100644 index 0000000000..41c60b5694 --- /dev/null +++ b/.github/workflows/blobstorage-production.yml @@ -0,0 +1,30 @@ +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_BLOBSTORAGE }} + +on: + push: + tags: + - "blobstorage-*" + +jobs: + Deploy-Production: + runs-on: [taiko-runner] + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install pnpm dependencies + uses: ./.github/actions/install-pnpm-dependencies + + - name: Install Vercel CLI + run: pnpm add --global vercel@latest + + - name: Pull Vercel Environment Information + run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} + + - name: Build Project Artifacts + run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} + + - name: Deploy Project Artifacts to Vercel + run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} diff --git a/.gitignore b/.gitignore index 91a3e81bbd..967a0a478d 100644 --- a/.gitignore +++ b/.gitignore @@ -117,3 +117,4 @@ __pycache__/ # VSCode .vscode/launch.json packages/protocol/config.js +.vercel