Skip to content

Commit

Permalink
feat: add submodule checkout code (#4620)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
sulmoJ authored Sep 2, 2024
1 parent 7378381 commit e74b29a
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions .github/workflows/dispatch_preview_deploy_with_vercel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}

0 comments on commit e74b29a

Please sign in to comment.