Skip to content

Commit 1b7704e

Browse files
committed
link the docs' sources to the released tag
1 parent 44962fd commit 1b7704e

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎.github/workflows/docs.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ jobs:
3434
run: node scripts/version.js "$VERSION"
3535
env:
3636
VERSION: ${{ inputs.version }}
37-
- run: npm run docs
37+
# (source links point at the released tag, not at master, which moves on)
38+
- run: npm run docs -- ${VERSION:+--gitRevision "v$VERSION"}
39+
env:
40+
VERSION: ${{ inputs.version }}
3841

3942
- uses: actions/configure-pages@v6
4043
- uses: actions/upload-pages-artifact@v5

‎scripts/docs.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ const out = path.join(root, 'docs');
1111
const typedoc = path.join(path.dirname(require.resolve('typedoc/package.json')), 'bin/typedoc');
1212

1313
fs.rmSync(out, { recursive: true, force: true });
14-
execFileSync(process.execPath, [typedoc], { cwd: root, stdio: 'inherit' });
14+
// (arguments are typedoc's: the docs workflow links the sources of the released tag with --gitRevision)
15+
execFileSync(process.execPath, [typedoc, ...process.argv.slice(2)], { cwd: root, stdio: 'inherit' });
1516

1617
const site = 'https://imagescript.dev/';
1718
const description = 'Pure TypeScript image processing that runs everywhere: Node.js, Deno, Bun, browsers and edge runtimes';

0 commit comments

Comments
 (0)