On the $ \Gamma $-convergence of the Allen-Cahn functional with boundary conditions