If $f$ is not surjective, then the degree is necessarily zero. The way I'll prove this is a follows. First, I'll show how to turn $f$ into a new map $f'$ between closed oriented manifolds (i.e., they have no boundary) in such a way that $\deg f = \deg f'$. The process will obviously take a non-surjective $f$ to a non-surjective $f'$. But for closed manifolds, we already know that $\deg f' = 0$ if $f'$ is not surjective.
So, let's construct $f'$ and the closed manifolds. I will assume $M$ is oriented, and I'll let $-M$ denote $M$ with the opposite orientation.
Form the space $M' := M\coprod_{\partial M} -M$, where we glue $M$ to $-M$ along their common boundary $\partial M$ via the identity map. Note that $M'$ is a topological manifold without boundary, and is naturally oriented. Similarly, form the space $N'$. Note that $M'$ contains a canonical copy of $M$ and a canonical copy of $-M$, and the the two boundaries, $\partial M$ and $\partial(-M)$ are identified, forming a codimension $1$ embedded submanifold of $M'$. Similar statements, of course, also apply to $N'$.
Then $f$ induces a map $f':M'\rightarrow N'$ defined as follows. For $x\in M$, define $f'(x) = f(x) \in N\subseteq N'$. For $x\in -M$, also define $f'(x) = f(x)\in -N\subseteq N'$. For $x\in \partial M = \partial (-M)$ (in $M')$, these two definitions agree, so from the pasting lemma, $f'$ is continuous. Note that if $f$ happens to not be surjective, say, missing a point $n\in N$, then $f'$ also misses $n\in N\subseteq N'$, so $f'$ is not surjective either.
Fixing $x\in \partial M\subseteq M'$ and noting that $f(x)\in \partial N\subseteq N'$ we may view $f'$ as either a map $(M',\partial M)\rightarrow (N',\partial N)$ or as a map $(M', x)\rightarrow (N', f(x))$.
We obtain a commutative diagram:
\begin{align*} (M', x) & \xrightarrow{f'} & (N',f(x))\\
\downarrow & & \downarrow\\
(M', \partial M) & \xrightarrow{f'} & (N', \partial N)\\
\uparrow & & \uparrow\\
(M,\partial M) & \xrightarrow{f} & (N,\partial N)\\
\end{align*}
Let's compute $H_n$ of this diagram, where $n = \dim M$. To that end, note that $H_n(M',\partial M)\cong \mathbb{Z}^2$. Indeed, the quotient map $(M',\partial M)\rightarrow (M'/\partial M, \partial M/\partial M)$ induces an isomorphism since $(M',\partial M)$ is a good pair. But $M'/\partial M$ is homeomorphic to the one point union $(M/\partial M)\vee (-M/\partial M)$. Thus $$H_n(M',\partial M) \cong H_n(M/\partial M)\oplus H_n(M/\partial M)\cong H_n(M,\partial M)\oplus H_n(M,\partial M)\cong \mathbb{Z}\oplus \mathbb{Z}.$$
So, taking $H_n$ of the diagram, we obtain the following diagram: \begin{align*} \mathbb{Z} & \xrightarrow{\deg f'} & \mathbb{Z}\\
\downarrow & & \downarrow\\
\mathbb{Z}^2 & \xrightarrow{f'_\ast} & \mathbb{Z}^2\\
\uparrow & & \uparrow\\
\mathbb{Z} & \xrightarrow{\deg f} & \mathbb{Z}
\end{align*}
Proposition: We have $\deg f = \deg f'$.
Proof:
From the construction, the upward maps send $1$ to $(1,0)$. Starting in the bottom left corner and moving right then up, we find $1\mapsto \deg f \mapsto \deg f\cdot (1,0)$.
Again starting in the bottom left, but this time moving up then right, we get $1\mapsto (1,0)\mapsto f_\ast(1,0)$, so we see that $f_\ast(1,0) = \deg f\cdot (1,0)$.
If we repeat the construction of the diagram with the bottom spaces replaced by $(-M,\partial M)$ and $(-N,\partial N)$, the upward map sends $1$ to $(0,1)$. Now the same proof shows that $f_\ast(0,1) = \deg f\cdot (0,1)$.
It now follows that $f_\ast$ is simply multiplication by $\deg f$.
Now let's look at the downward map. This will send $1$ to $(1,1)$. Starting with a $1$ in the top left and moving down then right, we find $1\mapsto (1,1)\mapsto \deg f\cdot (1,1)$. On the other hand, starting with a $1$ in the top left, and then moving right and then down, we find $1\mapsto \deg f' \mapsto \deg f'\cdot (1,1)$.
So, we see $\deg f\cdot (1,1) = \deg f'\cdot (1,1)$, so $\deg f = \deg f'$ as claimed. $\square$.