diff --git a/.github/workflows/vercel-deploy.yml b/.github/workflows/vercel-deploy.yml index 712129d..fb71b8f 100644 --- a/.github/workflows/vercel-deploy.yml +++ b/.github/workflows/vercel-deploy.yml @@ -1,4 +1,7 @@ name: Deploying to Production (Vercel.com) +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_TEAM_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} on: push: @@ -15,22 +18,17 @@ jobs: runs-on: ubuntu-latest if: github.event_name == 'push' || (github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'master') steps: - - name: Checkout code - uses: actions/checkout@v3 + - name: Checkout project source + - uses: actions/checkout@v - - name: Set up Node.js Environment - uses: actions/setup-node@v3 - with: - node-version: '18' + - name: Install Vercel CLI Latest + run: npm install --global vercel@latest + + - name: Pull Vercel Environment Information + run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} - - name: Install project dependencies - run: npm ci + - name: Build Project Artifacts + run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} - - name: Build the project - run: npm run build - - - name: Deploy to Vercel - env: - VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} - run: | - npx vercel --prod --token=$VERCEL_TOKEN + - name: Deploy Project Artifacts to Vercel + run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} \ No newline at end of file