There are currently two ways to deploy Electric on WeDeploy!

#1 Electric CLI

The Electric CLI comes with a handy electric deploy  command that will build your electric project and push the /dist folder to a deploy branch on your connected GitHub repo. Then you can go to your project on the WeDeploy Console and connect that branch under the Deployment tab.

#2 Serve the /dist folder

The other option is to deploy the whole electric project as a WeDeploy Hosting service and then tell it to serve the dist folder. To do this, simply add this you will need to declare the Hosting image and an environment variable in your wedeploy.json.  It would look like this:

  "id": "serviceid",
  "image": "wedeploy/hosting:2.0.0",
  "env": {
    "WEDEPLOY_WEB_PATH": "./dist"

Then you can either deploy with our command line (we deploy -p projectid ) or link the GitHub repo to your WeDeploy project like in method #1.

Did this answer your question?