In this chapter, the Gibeonites deceive the Israelites to swear a treaty of non-aggression.
Immediately after the destruction of Ai, we are told that the Canaanites are responding in essentially two ways. Most of the nations are preparing themselves to fight against Israel, but one of the nearby towns called Gibeon is instead trying to deceive Israel by pretending to be from outside of the promised land and thereby seek peace. Remember that Israel was prohibited from making peace with Canaanites, but was allowed to make peace with nations from other lands (Deut 20:15-16), so the only way the nations of Canaan would get peace is through deception.
Before continuing, I should give some background on Gibeon. Since this chapter doesn't really explain, Gibeon is a city that is somewhat north of Jerusalem in eastern Israel. Not only is it in the promised land, it is also very close to where the invasion is happening, which helps to explain why the Israelites come across Gibeon within three days of swearing the treaty (v. 16) and also the urgency with which the Gibeonites attempted to negotiate. The further away nations are willing to fight, but the Gibeonites know that they will be attacked very soon by Israel after the destruction of Ai and Bethel. The Gibeonites are not only within the promised land, they are one of the closest cities to Jericho and Ai.
So with that in mind, I think the central verse of this chapter is verse 14, which finds fault with the Israelites; they made a decision in haste and did not consult with the LORD. It's an obviously moralizing story and because we, as people, will always make bad decisions on our own, we must always turn to the LORD for guidance when taking a major action. As we learn from this chapter, the Israelites swore an oath to not harm the Gibeonites even though the LORD had commanded them otherwise, and interestingly the oath takes precedence over the LORD's command. "The leaders" insist that they must not harm the Gibeonites because they swore by the LORD and are now bound by their oath. This puts Israel into a difficult position because they are now constrained to not fully carry out what the LORD commanded them. Deut 20:18 warns that the inhabitants of the land would "teach you to do according to all their detestable things... so that you would sin", and now there is going to be a city of Hivites always living in their midst.
Instead, Joshua consigns them to perpetual slavery which was also briefly mentioned in Deut 29:12, doing heavy manual labor on behalf of their conquerors. The Gibeonites as a people are mentioned later just once, so it appears that they gradually intermarried with the Israelites or otherwise faded into irrelevance. It's interesting to note that marrying a Gibeonite is prohibited by the Jewish Mishnah, although I can't imagine there's many people in the world today who identify themselves as Hivite.
Lastly, I'll mention that v. 27 contains the phrase "the place which he would choose" as a reference to the future temple. This phrase showed up a bunch of times in Deuteronomy, and its presence here is yet another connection between the Pentateuch and Joshua.