functiondigital-ocean

DigitalOcean Function "Nothing Deployed"


I built and deployed some functions several weeks ago. What's there runs great, but I made some minor changes and they will not deploy. Neither of these work:

doctl serverless watch packages/utilities/send-mail

doctl serverless deploy packages/utilities/send-mail

I just see this:

Watching 'packages/utilities/send-mail' [use Control-C to terminate]

Deploying 'packages/utilities/send-mail' due to change in 'packages/utilities/send-mail/send-mail.js'

Nothing deployed
Deployment complete.  Resuming watch.

No errors. No updates.

project.yml

parameters: {}
environment: {}
packages:
    - name: utilities
      shared: false
      environment: {}
      parameters: {}
      annotations: {}
      functions:
        - name: send-mail
          binary: false
          main: ""
          runtime: nodejs:18
          web: true
          webSecure: false
          parameters: {}
          environment: {
            MAIL_HOST: ${MAIL_HOST},
            MAIL_USER: ${MAIL_USER},
            MAIL_PASS: ${MAIL_PASS}
          }
          annotations: {}
          limits: {}

Solution

  • Replace the path with a dot. You must watch/deploy the project directory, not the function directory.

    doctl serverless deploy .

    Edited: Hat tip to Matt.