diff --git a/.github/actions/deploy-to-vercel/action.yml b/.github/actions/deploy-to-vercel/action.yml index 9490c11e2..4355a75fd 100644 --- a/.github/actions/deploy-to-vercel/action.yml +++ b/.github/actions/deploy-to-vercel/action.yml @@ -21,28 +21,24 @@ runs: run: npm install -g vercel shell: bash - - name: Authenticate with Vercel - env: - VERCEL_TOKEN: ${{ inputs.VERCEL_TOKEN }} - run: vercel login --token ${{ env.VERCEL_TOKEN }} - shell: bash - - name: Deploy to Vercel (Staging) - if: ${{ inputs.ENVIRONMENT == 'staging' }} + if: ${{ inputs.ENVIRONMENT == 'Staging' }} shell: bash env: VERCEL_ORG_ID: ${{ inputs.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ inputs.VERCEL_PROJECT_ID }} + VERCEL_TOKEN: ${{ inputs.VERCEL_TOKEN }} run: | - url="$vercel deploy --cwd build" + url="$(vercel deploy --cwd build --token=$VERCEL_TOKEN)" vercel alias set "$url" staging-api.binary.sx - name: Deploy to Vercel (Production) - if: ${{ inputs.ENVIRONMENT == 'production' }} + if: ${{ inputs.ENVIRONMENT == 'Production' }} shell: bash env: VERCEL_ORG_ID: ${{ inputs.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ inputs.VERCEL_PROJECT_ID }} + VERCEL_TOKEN: ${{ inputs.VERCEL_TOKEN }} run: | - url="$vercel deploy --cwd build" + url="$(vercel deploy --cwd build --token=$VERCEL_TOKEN)" vercel alias set "$url" api.binary.sx diff --git a/.github/workflows/vercel-test.yml b/.github/workflows/vercel-test.yml index 108be06e6..dd622a314 100644 --- a/.github/workflows/vercel-test.yml +++ b/.github/workflows/vercel-test.yml @@ -35,4 +35,4 @@ jobs: VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} VERCEL_TOKEN: ${{ secrets.VERCEL_API_TOKEN }} - ENVIRONMENT: staging + ENVIRONMENT: Staging