There is such an algorithm, but first a quick note: $\sum_{i=1}^\infty i$ is not a conditionally convergent sequence. It is not convergent at all. It is equal to $-1/12$ in the sense of Ramanujan convergence, but that is not applicable to the Riemann series theorem.

Suppose that the series $$\sum_{i=1}^\infty a_n$$ of real numbers is conditionally convergent. Then there must be an infinite subsequence $\{a_{n_k}\}$ of positive terms of $\{a_n\}$ and an infinite subsequence $\{a_{m_k}\}$ of negative terms of $\{a_n\}$. The sequence $\{a_{n_k}\}$ must ahve a largest element, and $\{a_{m_k}\}$ must have a smallest element. Let's say you want to rearrange the series to add to some number $r$. Suppose that $r>0$. Start adding the terms of $\{a_{n_k}\}$ starting from the largest on down until the sum is bigger than $r$. Then add terms of $\{a_{m_k}\}$ starting from the smallest on up until the sum is smaller than $r$. Then add some more terms of $\{a_{n_k}\}$ until the sum is bigger again, and continue the process forever. Since the series is conditionally convergent, both series $$\sum_{k=1}^\infty a_{n_k}$$ and $$\sum_{k=1}^\infty a_{m_k}$$ are infinite, so you can always complete each step. In the limit, your sum will be $r$. If you want to add to some $r<0$, do the same thing, but start with the negative terms instead.