Let $G : [0,\infty ) \rightarrow \mathbb{R}$ be a smooth function such that $g(0)=0$. Then consider the initial value problem \begin{align*} u_t - u_{xx} &= 0, \ \ \ 0 < x < \infty, \ \ t>0 \\ u(x,0) &= 0, \ \ \ 0 < x < \infty, \\ u(0,t) &= g(t), \ \ \ t >0. \end{align*} Then the solution is given as $$u(x,t) = \frac{x}{\sqrt{4\pi}}\int_0^t \frac{1}{(t-s)^{3/2}}e^{-\frac{x^2}{4(t-s)}}g(s) ds.$$
The solution should follow a similar line of thinking to when $u(x,0)=g(x)$ and $u(0,t)=0$, which is a well known result. So I know I should potentially try letting $v(x,t) = u(x,t) - g(t)$ and perhaps extending $v$ to $x<0$ by an odd reflection.