We don't have diagrams of the mechane's design, unfortunately; there's no archaeological evidence because the 5th century BCE remains of the theatre of Dionysos are very overlain with material from later periods; and in terms of textual evidence, there are no documents describing its mechanics. Vase paintings of dramatic scenes typically go for 'in-world' depictions -- that is, a flying god is depicted as a flying god, not as an actor on a crane.
One key source is a discussion of theatrical devices by Pollux, Onomasticon 4.127-132:
The mechane displays gods and heroes in the air, Bellerophons and Perseuses; it sits in the left parodos [side passage], reaching above the skene [stage building] in height. In tragedy it is called the mechane [device], in comedy the krade [branch]. ... Gods appear from the theologeion [god-speaking-spot] on high above the skene, like Zeus and his entourage in [Aischylos'] Psychostasia. The geranos [crane] is the machine which comes down from above to pick someone up, which Eos uses when she is taking up Memnon's body.
The mechane and the geranos are customarily taken to be the same thing. It isn't really clear. It sounds like Pollux is describing the mechane moving people horizontally through the air, and the geranos picking people up and putting them down vertically. But we have further evidence that indicates that the mechane could swivel. A fragmentary and tantalising papyrus that was published in 1968, p. Oxy. 2742, contains a scholarly commentary on a 5th century comic play, which quotes a character in Strattis' lost Atalantos saying,
Off the branch [krade]! Because (hanging here like this) I'm turning into a fig. Let the mechane-operator bring me down as fast as he can!
The word 'branch' here is the same word that Pollux (4.128) identifies as the comic word for the mechane; the word for the 'mechane-operator' is the mechanopoios. Then the papyrus goes on to quote from Aristophanes' lost Gerytades:
The mechane-operator was supposed to turn the branch [krade] around quickly!
So it can clearly swivel as well as go up and down. It does sound as if the mechane and the geranos are the same thing. But then again, stage mechanisms presumably varied from time to time, and must have had different vocabulary and different capabilities. In a similar vein, in Aristophanes' Clouds Sokrates appears in mid-air, presumably coming from the side on the mechane/krade, and is then set down on the ground.
So we must be looking at a system with a strong arm and a strong foundation to hold up the actor from a significant distance to the side, and pulleys to move the arm up and down. The comic references to a mechane-operator suggest a single individual in charge, but surely that individual would be a supervisor, not doing all the labour themself.
The earliest definite date at which we can say for sure that the device was used is in 431 BCE, in Euripides' Medeia. There are numerous later uses of it -- 10 uses of the device in Euripides' extant plays, one in Sophokles, four in Aristophanes, and a handful more in 4th century fragmentary Old/Middle Comedies. There are two possible indications that it was used earlier, by Aischylos, who died in the 450s. First, the reference in Pollux, above, to the 'theologeion on high above the skene' gives Aischylos' lost Psychostasia as its example; but then again, that may have nothing to do with the crane -- Pollux refers to 'Zeus and his entourage', which would have to mean lots of cranes, and that's very implausible. Second, the Life of Aischylos, T 1 Radt section 14, claims that Aischylos 'made a striking visual impression ... [with a list of various techniques, including] his use of the mechane'. Given the list-like context, this could be a bit of imagination on the writer's part; also, the line is missing in two manuscripts of the Life. So it's far from definite.
In pre-Medeia plays, the chief theatrical machine used was the ekkyklema, the wheeled platform that could be moved in and out of the door of the skene building for presenting tableaus, and of course that's much more straightforward mechanically.
Just as a by-the-by, deus ex machina is a modern title. It's a translation of a corresponding Greek proverb, but the Latin phrase wasn't used until the modern era.