-
Notifications
You must be signed in to change notification settings - Fork 27
88 lines (76 loc) · 2.4 KB
/
generate.yml
File metadata and controls
88 lines (76 loc) · 2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Generate Docs
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
generate:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- target: man-page
input: './node/doc/api/cli.md'
- target: addon-verify
input: './node/doc/api/addons.md'
- target: api-links
input: './node/lib/*.js'
- target: orama-db
input: './node/doc/api/*.md'
- target: json-simple
input: './node/doc/api/*.md'
- target: legacy-json
input: './node/doc/api/*.md'
- target: legacy-html
input: './node/doc/api/*.md'
- target: web
input: './node/doc/api/*.md'
- target: llms-txt
input: './node/doc/api/*.md'
fail-fast: false
steps:
- name: Harden Runner
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
egress-policy: audit
- name: Git Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Git Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
repository: nodejs/node
sparse-checkout: |
doc/api
lib
path: node
- name: Setup Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Create output directory
run: mkdir -p out/${{ matrix.target }}
- name: Generate ${{ matrix.target }}
run: |
node bin/cli.mjs generate \
-t ${{ matrix.target }} \
-i "${{ matrix.input }}" \
-o "out/${{ matrix.target }}" \
--index ./node/doc/api/index.md
- name: Upload ${{ matrix.target }} artifacts
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: ${{ matrix.target }}-${{ github.run_id }}
path: out/${{ matrix.target }}