Skip to content

fix: cannot redirect to app #128

fix: cannot redirect to app

fix: cannot redirect to app #128

Workflow file for this run

name: Vercel Preview Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
on:
push:
branches:
- next
jobs:
Deploy-Next:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Corepack
shell: bash
run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Link Vercel Project
run: npx vercel link --yes --scope=${{ secrets.VERCEL_ORG_ID }} --project=${{ secrets.VERCEL_PROJECT_ID }} --token=${{ secrets.VERCEL_TOKEN }}
- name: Pull Vercel Environment Information
run: npx vercel env pull .env --yes --environment=preview --git-branch=next --token=${{ secrets.VERCEL_TOKEN }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_S3_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_S3_REGION }}
- name: Build Project Artifacts
run: npx vercel build --yes --token=${{ secrets.VERCEL_TOKEN }}
- name: Upload assets to S3
run: aws s3 sync ./.vercel/output/static s3://${{ secrets.AWS_S3_BUCKET }}/assets --delete
- name: Deploy Project Artifacts to Vercel
run: npx vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}