I would never do that alone, and I've done many.
I can't think of a safe way to do it yourself.
Your ramp, is it flat and solid, or one with a grid design? The grid usually fights you.
Remove both back wheels from the truck and lower it as much as possible? I'm kinda kidding, really.
Honestly, you'd have to not care about the bike, truck, ramp, and your body to attempt it. It's just too much for one person, that's why you see videos of people crashing when they try to ride up a ramp into a truck.
When I was using ramps with my truck, I made pins that stayed tethered to the ramp, and drilled holes in the tailgate for the pins. Why? Because I flipped a Polaris Sportsman over backward off the truck when I spun the ramp out from under me.