Skip to content

Commit 707d3ed

Browse files
committed
Fix auth api report being altered
1 parent 64fae79 commit 707d3ed

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.github/workflows/check-docs.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@ jobs:
2121
run: yarn
2222
- name: Run doc generation (devsite docs)
2323
run: yarn docgen devsite
24-
- name: Check for changes (fail if so)
25-
run: |
26-
cd docs-devsite
27-
git diff --exit-code
24+
- name: Check for changes in docs-devsite dir (fail if so)
25+
run: git diff --exit-code docs-devsite
2826
- name: Reference documentation needs to be updated. See message below.
2927
if: ${{ failure() }}
3028
run: echo "Changes in this PR affect the reference docs. Run \`yarn docgen devsite\` locally to regenerate docs and add them to this PR."

scripts/docgen/docgen.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,11 @@ async function generateDocs(
136136
`${projectRoot}/packages/auth/api-extractor.json`,
137137
'utf8'
138138
);
139+
// Save original auth.md as well.
140+
const authApiReportOriginal = fs.readFileSync(
141+
`${projectRoot}/common/api-review/auth.api.md`,
142+
'utf8'
143+
);
139144
const authApiConfigModified = authApiConfigOriginal.replace(
140145
`"mainEntryPointFilePath": "<projectFolder>/dist/esm5/index.d.ts"`,
141146
`"mainEntryPointFilePath": "<projectFolder>/dist/esm5/index.doc.d.ts"`
@@ -173,6 +178,11 @@ async function generateDocs(
173178
`${projectRoot}/packages/auth/api-extractor.json`,
174179
authApiConfigOriginal
175180
);
181+
// Restore original auth.api.md
182+
fs.writeFileSync(
183+
`${projectRoot}/common/api-review/auth.api.md`,
184+
authApiReportOriginal
185+
);
176186

177187
if (!fs.existsSync(tmpDir)) {
178188
fs.mkdirSync(tmpDir);

0 commit comments

Comments
 (0)