The generator power should be very clean - other devices loading it with electric motors (refrigerators, vacuum cleaners, air conditioners) could cause spikes, but you should be able to run generator to UPS to computer just fine. We do it with amateur radio stations for field day every year. Hospitals and other agencies have emergency generators and run their computers on them also.
Fred Wagner