Slave labour was used apparently:
After the beginning of the Great Jedi Purge, an assault was led on the planet Kashyyyk to enslave the native Wookiees for the Death Star's construction. Various prison planets were also known to have their captives unwittingly construct various sections of the station. The Empire also had Mrlssi scientists working on some of the technology that would go into the station.[6]
Wilhuff Tarkin with Emperor Palpatine and Darth Vader in 19 BBY overlooking the construction of the first Death Star.
Nevertheless, the project nearly ended before it began. Because much of the technology of the Death Star was impressive, actually building it proved to be more difficult than anyone imagined. Efforts were not helped by repeated (and often unsuccessful) sabotage efforts.
Of particular concern was the technology required to create the massive superlaser, the heart of the weapon. To this end, Tarkin brought together some of the most brilliant minds of the Galaxy, including Tol Sivron, Qwi Xux, and Bevel Lemelisk, and built a proof-of-concept model at the Maw Installation. This model would eventually become known as the Death Star Prototype. These scientists also found and corrected several flaws in the Geonosian blueprints, which had been used in that phase of construction. Renowned physicist Rorax Falken worked with the Empire at some point during the construction of the Death Star, though he was not aware that his ideas and knowledge were being used for a battlestation.[6]
With the concept completed and the plans finalized, Lemelisk took the plans to Despayre, where construction would finally be completed after twenty years of hard work and the death of many individuals. In celebration, the Death Star turned its massive weapon on Despayre itself, completely destroying it.
http://starwars.wikia.com/wiki/Death_Star