Automatic Deployments from Github with dynamic service name

CI/CD question here that I’ve been struggling with for a little while now. We have a GitHub repo containing a single serverless.yml file. The service name is set by a variable, with a default value, like so:

service: ${opt:name, ‘test’}

When we run “serverless deploy” from the command line this works fine, deploying a service called “test”. But when trying to configure automatic deployments from GitHub through the serverless dashboard, this doesn’t work. More specifically, I get a 400 response back from the services endpoint. The request payload is this:

serviceName: “${opt:name, ‘test’}”

So the service name is being set to the definition of the variable, not to the value of the variable. I have tried changing the syntax to ${param:name} and then setting a deployment profile parameter called name, but this gave the same issue.

Has anyone run into this before or know how to get something like this working?