Share via

App service wont deploy from github actions

giga-mike 0 Reputation points
2025-09-15T18:44:45.38+00:00

We have a nextjs app that gets deployed in standalone mode when we push to dev in one environment and live in another environment.

This application has been up and running for about a year.

Today, we made some updates, deployed to dev - successfully, then deployed the same code to live, and it didn't deploy successfully after 20 minutes of trying. Looks like the Zip from within github actions never got pushed to Azure.

After many re-attempts and restarting the app and redeploying with dummy deploys, occasionally, we can get it to deploy, but then it will say there's an application error.

Not only that, but the live app is also down as well.

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.


1 answer

Sort by: Most helpful
  1. Jerald Felix 13,500 Reputation points Volunteer Moderator
    2025-09-16T04:20:06.5066667+00:00

    Hello giga-mike,

    It's stressful when a previously reliable deployment fails and takes down your live app. Since the same code deploys to your dev environment successfully, the issue is likely with your live App Service instance, not the GitHub Actions workflow itself.

    The symptoms—a stalled zip push and subsequent application errors usually point to a problem on the App Service side.

    Here is a short recovery plan:

    Redeploy a Known-Good Version: Your first step is to get the site back online. Go to your GitHub Actions history, find the last successful deployment, and use the "Re-run jobs" button to redeploy that stable version. This should restore service.

    Clear "Stuck" Deployment Packages: The deployment is likely hanging due to a locked or corrupted package file on the server.

    Go to your App Service's Kudu console (URL: https://<your-app-name>.scm.azurewebsites.net/).

      Navigate to the **`D:\home\data\SitePackages`** folder.
      
         Delete the **`packagename.txt`** file and any recent **`.zip`** files.
         
            Restart the App Service from the Azure portal.
            
            **Check App Service Plan Health:** Your App Service Plan might be out of resources (CPU/memory), which can cause deployments to fail and the app to crash. In the Azure portal, check the metrics for your App Service Plan. If it's overloaded, **scale it up** to a higher tier.
            
            **Retry the New Deployment:** After performing these steps, try deploying your new code again.
            
    

    This process will clear any blockages on the server and ensure it has enough resources to accept the new deployment.

    Best Regards,

    Jerald Felix .

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.