Islamic militants in Teheran are continuing to publish photocopies of secret cablegrams, Government documents and personal papers found when they seized the United States Embassy there on Nov. 4, 1979. And since thousands of pages of sensitive documents are believed to be still in the Iranians' hands, it is possible they will be published for years to come.

Seventeen paperback volumes of the papers, titled ''The Spy Nest Documents'' and published in Iran over the last two years, were recently made available to The New York Times. Their contents were authenticated independently.

Together with 13 earlier volumes that came to the attention of Western journalists two years ago, they represent one of the most extensive intelligence losses since the United States hurriedly evacuated its embassy in Saigon in 1975. The books, which include translations into Persian, are sold in Teheran bookshops, and some of them have already been been sold out in Iran.

The documents in the 17 volumes date from the early 1950's to just hours before the embassy was seized. Many of them had been destroyed by embassy personnel in shredders and were painstakingly pasted back together by the militants. The papers offer a rare glimpse of how American intelligence gathering is carried out. They also provide graphic testimony of the Carter Administration's apparent reluctance to face the erosion of the Shah's power and its near-total inability to develop relations with the revolutionary regime of Ayatollah Ruhollah Khomeini.

The continuing publication of the documents in Teheran is still compromising United States intelligence sources and methods, some authorities believe.

Many Iranians Affected

''The most regrettable effect of the files falling into the hands of the students was that every Iranian who had any contact with the embassy in the normal course of diplomatic reporting was potentially subject to blackmail or prosecution on the presumption that he was working for the United States,'' writes Gary Sick, who served as the principal staff member for Iran on the National Security Council during the Carter Administration.

Mr. Sick contends in a forthcoming book that it was irresponsible for American officials to have failed to take the most elementary precautions to prevent such an overwhelming breach of security.

The militant group that seized the embassy, which calls itself the Students Following the Line of the Imam, has said it believes that publication of the purloined material is part of a divine revolutionary mission.

''One of the ways the United States gathered information about the Islamic Revolution was through its official meetings with various individuals who were all their spies in Teheran,'' said one commentary in Persian among the papers. ''It is a sacred duty for our Moslem nation to recognize the Great Satan's conspiracy and to guard the Islamic Republic against the attackers of the East as well as the West.''

Embassy Got Signals

Of Ruler's Illness

Among the most startling revelations was that United States Embassy officials had warning signals that Shah Mohammed Riza Pahlevi was seriously ill months before the Iranian leader abruptly left the country, but they appear to have played down the evidence and continued to send optimistic reports on his chances for political survival.

The Shah was ''physically all right'' but ''somewhat 'down' mentally'' and blood tests were ordered, a reliable Iranian source with close ties to the Shah's court told an embassy official in August 1978, six months before the revolution.

He added, according to one document, that the ''U.S. and others should keep an eye on the Shah and if something were wrong, they should urge him not to convene the Regency Council'' but to ''prepare Iran for change, not just depart Iran abruptly as his father had done.''

The memo concluded, ''The embassy has no evidence to indicate there is anything wrong, but the rumors are beginning to take on a life of their own.''

Because the memo was sent as a low priority airgram, not a cablegram, it never received wide or high-level distribution in Washington, certainly not in the White House, according to one high- ranking official in the Carter Administration.

A subsequent memorandum about the Shah's health was never sent to Washington, but circulated internally in the embassy and filed away. Quoting a source who claimed to know the Shah's doctor, the memo said, ''The Shah suffered an infractus three years ago and recently, after hearing news of the Afghanistan coup d'etat, he suffered a stomach hemorrhage and had to be moved from Shiraz to Kish Island for convalescence.''

''Infractus'' apparently refers to an infarction, which can be a cardiac, pulmonary, cerebral or intestinal ailment.

Shah's Entry Into U.S.

Touched Off Crisis

A few months later, the Shah left the country, and in October l979 he entered the United States for medical treatment, an action that led to the seizure of the United States Embassy and set off the hostage crisis. He underwent surgery for a number of ailments and died of lymphatic cancer in an Egyptian military hospital in July 1980.