I'm trying to deploy my application on vercel through a GitHub workflow that runs whenever the code is pushed onto the remote repository. The workflow is successfully running, but when I visit the deployed link, an empty white page is shown. On inspecting the network tabs, I could see that the request to the URL is returning a 304 status code. I'm quite clueless why this is happening. Below is the folder structure of my project.
Below is my workflow file
name: Preview Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
push:
branches-ignore:
- release
jobs:
Deploy-Preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
During the build step, I could also notice the following log along with some other warnings:
Failed to load ./.env.
Despite the warnings(mostly related to the build file size being over the recommended size) and the above log, the build is successful. How do I fix this 304 issue? TIA
Further, to verify things, I also built the application locally and tried running it, and it worked as expected.