Hi, here’s my recommendation:
You don’t need to run npm run deploy from the server. First, make sure your deployment is done correctly. If you’re using a Remix app, ensure it’s built and deployed the same way as a standard React.js project.
Once the deployment is complete, you’ll have an access URL.
Next, go to your Dev Dashboard → Apps → Your App → Versions, and click “Create a version.”
Then, update the App URL and Redirect URLs with your deployed app’s URL.
Finally, release the new version.
Please refer this post: Workflow for Remix App hosted on fly.io