Here is analytical solution using eigenfunction expansion method.
Clear[x, t, a, b, an, sol, L0, k, qn, uEquib]
pde = Hold[D[u[t, x], t] - D[u[t, x], x, x] == 0];
(* find equilibrium solution, from setting D[u[t,x],t]=0*)
uEquib = a x + b;
uEquib = uEquib /. First@Solve[{(uEquib /. x -> 0) == Sin[t],
(uEquib /. x -> L0 ) == 0}, {a, b}]

(*use known eigenfunction for homogenouse heat PDE*)
eigFunction = Sin[n Pi x /L0];
pde = ReleaseHold[pde /. u[t, x] -> (an[t] eigFunction + uEquib)]

(*replace the new source by eigenfunction expansion*)
pde = pde /. (D[uEquib, t] -> qn eigFunction)

(*find qn by orthogonality*)
qn = 2/L0 Assuming[Element[n, Integers], Integrate[ D[uEquib, t] eigFunction, {x, 0, L0}]]

(*initial conditions, since v=u-r and u at t=0 is zero*)
ic = uEquib /. t -> 0
(*solve for an[t]*)
c = an[t] /. First@DSolve[{pde, an[0] == ic}, an[t], t]

L0 = 1; (*length*)
sol[t_, x_, k_] := Evaluate[Sum[ c eigFunction + uEquib , {n, 1, k}]]

Plot the solution for 15 terms
Plot3D[sol[t, x, 15], {t, 0, 2 Pi}, {x, 0, L0}, AxesLabel -> {t, x, u}]

Complete code in one block
Clear[x, t, a, b, an, sol, L0, k, qn, uEquib]
pde = Hold[D[u[t, x], t] - D[u[t, x], x, x] == 0];
(* equilibrium solution, from setting D[u[t,x],t]=0*)
uEquib = a x + b;
uEquib = uEquib /. First@Solve[{(uEquib /. x -> 0) == Sin[t], (uEquib /. x -> L0 ) == 0}, {a, b}];
eigFunction = Sin[n Pi x /L0];
pde = ReleaseHold[pde /. u[t, x] -> (an[t] eigFunction + uEquib)];
(*replace the new source by eigenfunction expansion*)
pde = pde /. (D[uEquib, t] -> qn eigFunction) ;
(*find qn by orthogonality*)
qn = 2/L0 Assuming[Element[n, Integers],Integrate[ D[uEquib, t] eigFunction, {x, 0, L0}]];
(*initial conditions, since v=u-r and u at t=0 is zero*)
ic = uEquib /. t -> 0;
(*solve for an[t]*)
c = an[t] /. First@DSolve[{pde, an[0] == ic}, an[t], t];
L0 = 1;
sol[t_, x_, k_] := Evaluate[Sum[ c eigFunction + uEquib , {n, 1, k}]]
Plot3D[sol[t, x, 15], {t, 0, 2 Pi}, {x, 0, L0}, AxesLabel -> {t, x, u}]
Animation:
Animate[Plot[sol[t, x, 10], {x, 0, L0},
PlotRange -> {{0, L0}, {-10, 10}}, Frame -> True,
FrameLabel -> {{"u[x,t]", None}, {"x",
Row[{"time = ", NumberForm[N@t, {3, 2}], " seconds"}]}}], {t, 0,
20, 1/10}]

DSolve[{pde, bc}, u, {x, t}]
to provide a symbolic solution, but it returns unevaluated.NDSolveValue[{pde, bc}, u, {x, 0, 1}, {t, 0, 4}]
gives a numerical solution. $\endgroup$