php icon indicating copy to clipboard operation
php copied to clipboard

Files not getting excluded when deploying from GitHub Integration

Open DenverCoder1 opened this issue 2 years ago • 2 comments

Bug report

  • Version: 0.5.2
  • Repository: https://github.com/DenverCoder1/minimalistic-wallpaper-collection

Description

When automatically deploying from GitHub, the excluded files are not getting removed since I am getting the error:

Error: The Serverless Function "api/index" is 650.74mb which exceeds the maximum size limit of 50mb. Learn More: https://vercel.link/serverless-function-size

If the images directory is excluded, the project would be significantly under this limit.

When deploying manually with vercel --prod, it works just fine. The issue only occurs with Git deployments.

I have tried both using .vercelignore containing images, and using a vercel.json with excludeFiles:

{
    "functions": {
        "api/index.php": {
            "runtime": "[email protected]",
            "excludeFiles": "{images/**,.github/**}"
        }
    },
    "routes": [{ "src": "/(.*)", "dest": "/api/index.php" }],
    "github": {
        "silent": true
    }
}

Neither of these approaches fix the issue of GitHub deployments failing.

Screenshot

image

DenverCoder1 avatar Oct 09 '22 03:10 DenverCoder1

As a workaround, I disabled the Vercel GitHub integration and I'm using a GitHub action instead.

https://github.com/DenverCoder1/minimalistic-wallpaper-collection/blob/main/.github/workflows/vercel-deploy.yml

The vercel and vercel --prod commands work just fine, but there still seems to be a bug with the automatic builds.

DenverCoder1 avatar Oct 23 '22 16:10 DenverCoder1