@mdream/action 0.11.0 → 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 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)