The U.S. has no legal obligation to deploy its military to Taiwan if China invades it.
The 1979 Taiwan Relations Act, which governs relations between the U.S. and Taiwan, falls short of requiring a U.S. military response to a Chinese invasion, although it stipulates that the U.S. will continue providing Taiwan with defensive arms. It also permits the U.S. to "resist" actions that jeopardize the security of the people of Taiwan — a policy referred to as "strategic ambiguity."
The Act was signed into law to establish a back-channel relationship with Taiwan after the U.S. cut diplomatic ties with the island the year before at China's behest. Up to then, the U.S. had refused to acknowledge China's communist regime, instead recognizing the Nationalist Chinese government set up in Taiwan following Mao Zedong's 1949 revolution. However, perceiving the economic benefits of gaining access to Chinese markets, as well as the political advantages of exerting diplomatic pressure on the Soviet Union, the U.S. formally recognized communist China on Dec. 15, 1978.