For some documents, $$ if \displaystyle\inf_{\text{partition}}U_{\text{partition}}(f)=\sup_{\text{partition}}L_{\text{partition}}(f),\\then~f~is~Riemann\text{-}Stieltjes~integrable. $$ like the following:
However, my textbook said the definition of Riemann-Stieltjes integrability is: $$\lim_{\text{|Partition|}\to0}R_\text{Partition}$$ where $R_\text{Partition}$ is $\sum_\text{Partition}f(\xi_i)[{\phi(x_i)-\phi(x_{i-1})}]$, $\xi\in[x_{i-1}, x_{i}]$, and $\displaystyle\inf_{\text{partition}}U_{\text{partition}}(f)=\sup_{\text{partition}}L_{\text{partition}}(f)$ is not an equivalent definition of the Riemann-Stieltjes integrability.
My book gave a counter-example:
for the interval $[-1, 1]$, \begin{align} f(x)=\begin{cases}0\quad x\in[-1, 0) \\ 1\quad x\in [0,1]\end{cases} \end{align} \begin{align} \phi(x)=\begin{cases}0\quad x\in[-1, 0] \\ 1\quad x\in (0,1]\end{cases} \end{align}
The book concluded that in this case, $\inf U(f) = \sup L(f)$ but the value of Riemann-Stieltjes integral does not exist.
Which is correct?

The two definitions do not agree. However, there is no Mathematics Authority that declares definitions correct. So we cannot say that one is correct and the other is incorrect. We can only say that they are different.
So, when learning from a certain textbook, use the definition in that textbook.
What about after that course? Which definition should you use then? As a practical matter, nowadays mathematicians almost always use the Lebesgue-Stieltjes integral (or just integration with respect to a measure), and do not mention Riemann-Stieltjes integrals at all. In reading old literature, you may find Riemann-Stieltjes integrals; but you will find that the only cases considered are the ones where both definitions agree. As David Ullrich said, these are cases where the integrator and the integrand have no common discontinuities.
If, in some rare case, you have a Riemann-Stieltjes integral where the definitions disagree, then you should specify which definition to use. Maybe you would do this when you send a tricky problem to the problem section of the American Mathematical Monthly, for example.