@mdream/action 0.11.1 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +71 -0
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# @mdream/action
|
|
2
|
+
|
|
3
|
+
GitHub Action for generating `llms.txt` artifacts from HTML files.
|
|
4
|
+
|
|
5
|
+
This action processes HTML files using glob patterns to generate LLM-ready artifacts in CI/CD workflows. Useful for prerendered sites, it creates both condensed and comprehensive LLM-ready files that can be uploaded as artifacts or deployed with your site whenever you make changes.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
### Complete Workflow Example
|
|
10
|
+
|
|
11
|
+
```yaml
|
|
12
|
+
name: Generate LLMs.txt
|
|
13
|
+
|
|
14
|
+
on:
|
|
15
|
+
push:
|
|
16
|
+
branches: [main]
|
|
17
|
+
pull_request:
|
|
18
|
+
branches: [main]
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
generate-llms-txt:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
|
|
24
|
+
steps:
|
|
25
|
+
- name: Checkout repository
|
|
26
|
+
uses: actions/checkout@v4
|
|
27
|
+
|
|
28
|
+
- name: Setup Node.js
|
|
29
|
+
uses: actions/setup-node@v4
|
|
30
|
+
with:
|
|
31
|
+
node-version: '20'
|
|
32
|
+
|
|
33
|
+
- name: Install dependencies
|
|
34
|
+
run: npm ci
|
|
35
|
+
|
|
36
|
+
- name: Build documentation
|
|
37
|
+
run: npm run build
|
|
38
|
+
|
|
39
|
+
- name: Generate llms.txt artifacts
|
|
40
|
+
uses: harlan-zw/mdream@main
|
|
41
|
+
with:
|
|
42
|
+
glob: 'dist/**/*.html'
|
|
43
|
+
site-name: My Documentation
|
|
44
|
+
description: Comprehensive technical documentation and guides
|
|
45
|
+
origin: 'https://mydocs.com'
|
|
46
|
+
output: dist
|
|
47
|
+
|
|
48
|
+
- name: Upload llms.txt artifacts
|
|
49
|
+
uses: actions/upload-artifact@v4
|
|
50
|
+
with:
|
|
51
|
+
name: llms-txt-artifacts
|
|
52
|
+
path: |
|
|
53
|
+
dist/llms.txt
|
|
54
|
+
dist/llms-full.txt
|
|
55
|
+
dist/md/
|
|
56
|
+
|
|
57
|
+
- name: Deploy to GitHub Pages (optional)
|
|
58
|
+
if: github.ref == 'refs/heads/main'
|
|
59
|
+
uses: peaceiris/actions-gh-pages@v3
|
|
60
|
+
with:
|
|
61
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
62
|
+
publish_dir: ./dist
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Inputs
|
|
66
|
+
|
|
67
|
+
See [action.yml](../../action.yml) for all available options and advanced configuration.
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
|
|
71
|
+
[MIT](../../LICENSE.md)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mdream/action",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.12.0",
|
|
5
5
|
"description": "GitHub Action for mdream llms.txt generation",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@actions/core": "^1.11.1",
|
|
19
19
|
"@actions/exec": "^1.1.1",
|
|
20
|
-
"mdream": "0.
|
|
20
|
+
"mdream": "0.12.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@vercel/ncc": "^0.38.4",
|
|
24
|
-
"typescript": "^5.9.
|
|
24
|
+
"typescript": "^5.9.3"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build": "rm -rf dist && ncc build src/index.ts -o dist --no-source-map-register --minify && find dist -name '*.js' ! -name 'index.js' -delete",
|