Remix Js server returns 404 when requests for css and javscript are sent from the browser

I have redeployed using Github actions. However, requests to fetch CSS and javascript are returning NOT FOUND.It was working when I did the first deployment using CLI.

I redeployed using CLI and it is working

Command used : flyctly deploy -a appname

There should be no difference here. Are you using the statics in fly.toml?

I am not using that. Just using the default configuration fly.toml.

Which runtime are you using? Fly doesn’t serve static files by default. So they must be delivered by your app.

I am using Remix js which I guess is using a javascript runtime system

This sounds like something specific to your app setup. You may want to ask on the Remix Discord server - but you can also check to make sure your assets are being generated correctly. To do that. use fly ssh console and check in your public directory, wherever your app is stored in the VM.

Yeah, it was my setup. I recreated a new remix app, pasted folders from the old project and now Github actions are working very well. Furthermore, I was not deploying the public/build folder to the server because it was added by default in the .gitignore file. Thank you. I need now to figure out how to deploy to different environments(staging and production).

Glad you worked it out! Check this out for a way to do staging environments: GitHub Action for deplying staging apps on · Actions · GitHub Marketplace · GitHub

I have added a Github action for deploying staging apps when for example I open a pull request. The deployment is successful but I cannot see any staging app which I can access and test. Does the action create a staging app automatically or I am missing something?

I have just seen the app but when I access I am getting SITE CANNOT BE REACHED