$\int_{-\infty}^\infty \frac{e^{ax}}{1+e^x}dx$ with residue calculus

I think you may just have a simple sign error. Using the same contour you describe, I get that

$$\int_{-R}^R dx \frac{e^{a x}}{1+e^x} + i \int_0^{2 \pi} dy \frac{e^{a (R + i y)}}{1+e^{R+i y}} - e^{i a 2 \pi} \int_{-R}^R dx \frac{e^{a x}}{1+e^x} - i \int_0^{2 \pi} dy \frac{e^{a (-R + i y)}}{1+e^{-R+i y}} = -i 2 \pi e^{i a \pi}$$

As $R \to \infty$, the second integral (because $a \lt 1$) and the fourth integral (because $a \gt 0$) vanish. Thus we have

$$\int_{-\infty}^{\infty} dx \frac{e^{a x}}{1+e^x} = - i 2 \pi \frac{e^{i a \pi}}{1-e^{i 2 a \pi}} = \frac{\pi}{\sin{\pi a}}$$