Invoke actions from serverless.yml - I want to call a lambda function from the yml file

I’d like to update a product version after I run a serverless deploy command. Can I invoke a lamda from inside a yml file? I thought I could do the following, but it doesn’t seem like “invoke” works from a yml file? Is there a better/different way?

 service: blah-blah-yada

provider:
  name: aws
  runtime: nodejs8.10
  stage: ${opt:stage, 'dev'}
  region: us-west-2

# all the regular deploy functions are here, etc.
# now I want to call a function after everything has been deployed
invoke:
  functions:
    update-version-in-db:
      DB_NAME: ${self:provider.dbname}
      DB_PWD: ${self:provider.dbpwd}
      DB_SERVER: ${self:provider.dbserver}
      DB_USER: ${self:provider.dbuser}
      version: 1.12.08