From e74b29a8d18959405c53465dc49b6b2d69097d3a Mon Sep 17 00:00:00 2001 From: sulmo <50662170+sulmoJ@users.noreply.github.com> Date: Sun, 1 Sep 2024 18:15:45 -0700 Subject: [PATCH] feat: add submodule checkout code (#4620) feat: add submodule checkout code feat: fix feat: add submodule checkout code feat: add github action for vercel deploy fix: fix fix: fix Signed-off-by: sulmo --- .../dispatch_preview_deploy_with_vercel.yml | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dispatch_preview_deploy_with_vercel.yml b/.github/workflows/dispatch_preview_deploy_with_vercel.yml index e17fdb2288..ea77a360ca 100644 --- a/.github/workflows/dispatch_preview_deploy_with_vercel.yml +++ b/.github/workflows/dispatch_preview_deploy_with_vercel.yml @@ -4,9 +4,13 @@ on: workflow_dispatch: inputs: project: - description: 'enter vercel project name' + description: 'Enter Vercel project name' required: true default: 'feedback' + config_url: + description: 'Enter the URL of the Edge Config' + required: true + default: 'https://edge-config.vercel.com/ecfg_rowryyiesolfcdzbajjl4qbuf8ha?token=d065a733-22c4-44ad-8b86-7e2b68ad4241' env: TEAM_NAME: ${{ vars.VERCEL_TEAM_NAME }} @@ -17,14 +21,30 @@ jobs: Deploy-Production: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Checkout code and submodules + uses: actions/checkout@v2 + with: + submodules: true + fetch-depth: 0 + + - name: Set up environment + run: sudo apt-get install jq + + - name: Fetch Edge Config and Save to JSON + run: | + curl -s '${{ github.event.inputs.config_url }}' | jq '.' > ./apps/web/public/config/production.json + - name: Install Vercel CLI run: npm install --global vercel@latest + - name: Checkout Vercel Target Project run: vercel link --yes --scope=${{ env.TEAM_NAME }} --project=${{ env.PROJECT_NAME }} --token=${{ env.VERCEL_TOKEN }} + - name: Pull Vercel Environment Information run: vercel pull --yes --token=${{ env.VERCEL_TOKEN }} + - name: Build Project Artifacts - run: vercel build --yes --token=${{ env.VERCEL_TOKEN }} + run: vercel build --prod --yes --token=${{ env.VERCEL_TOKEN }} + - name: Deploy Project Artifacts to Vercel run: vercel deploy --prebuilt --prod --token=${{ env.VERCEL_TOKEN }}