This is an example of how to do text quests (trees) continued by post: https://pikuco.ru/posts/kak-delat-testy-na-pikuko--AKSCP/
If you haven't read the post, I will delete my account on Pikuco.
12 questions
Refueling the rocket...Remembering everything...Hacking the Pentagon...Lighting up the stars...Dividing by zero...Waiting for players...Raising the curtain...Playing with fonts...Looking for a dead pixel...Making a hyperspace jump...Sending signals to satellites...Mining bitcoins...
Test - Quest
Generally, this type of test represents a narrative quest;
The test is divided into questions presented to you one by one;
Each question may have one or several answer/action options;
Your answer may influence not only the next question but also the course of events;
The test will end when your actions lead to one of the possible outcomes.