-
Notifications
You must be signed in to change notification settings - Fork 0
161 lines (127 loc) · 4.93 KB
/
Copy pathsync-wiki.yml
File metadata and controls
161 lines (127 loc) · 4.93 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
name: Sync Documentation to Wiki
on:
push:
branches: [main]
paths:
- 'docs/**'
- 'README.md'
workflow_dispatch: # Allow manual trigger
jobs:
sync-wiki:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout wiki
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}.wiki
path: wiki
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Sync documentation files
run: |
# Create wiki directory if it doesn't exist
mkdir -p wiki
# Copy main README as Home page
cp README.md wiki/Home.md
# Copy all documentation files with new names
cp docs/design-tokens.md wiki/Design-Tokens.md
cp docs/implementation-guide.md wiki/Implementation-Guide.md
cp docs/github-pages-setup.md wiki/GitHub-Pages-Setup.md
# Create a comprehensive index page
cat > wiki/Documentation-Index.md << 'EOF'
# Documentation Index
Welcome to the React MFE Shell documentation! This wiki contains comprehensive guides and references for using and extending the design system.
## Main Documentation
- **[Home](Home)** - Project overview and quick start
- **[Implementation Guide](Implementation-Guide)** - Detailed implementation instructions
- **[Design Tokens](Design-Tokens)** - Comprehensive design token documentation
- **[GitHub Pages Setup](GitHub-Pages-Setup)** - Demo deployment guide
## Quick Links
### Getting Started
```bash
# Install in your project
npm install @jonmatum/react-mfe-shell
# Or clone for development
git clone https://github.com/jonmatum/react-mfe-shell.git
cd react-mfe-shell
npm install
npm run dev
```
### Design System Usage
```tsx
import {
SettingsProvider,
Button,
Input,
Badge,
tokens
} from '@jonmatum/react-mfe-shell';
function App() {
return (
<SettingsProvider>
<Button variant="primary">Hello World</Button>
</SettingsProvider>
);
}
```
### Development Commands
```bash
npm run dev # Start development server
npm run build:lib # Build library
npm run build:demo # Build demo
npm run test:run # Run tests
npm run lint # Lint code
```
## Live Demo
**[View Interactive Demo](https://jonmatum.github.io/react-mfe-shell/)**
## Additional Resources
- [GitHub Repository](https://github.com/jonmatum/react-mfe-shell)
- [Issues & Bug Reports](https://github.com/jonmatum/react-mfe-shell/issues)
- [Contributing Guidelines](https://github.com/jonmatum/react-mfe-shell/blob/main/CONTRIBUTING.md)
- [npm Package](https://www.npmjs.com/package/@jonmatum/react-mfe-shell)
---
*Last updated: $(date)*
*Auto-synced from repository documentation*
EOF
# Create sidebar navigation
cat > wiki/_Sidebar.md << 'EOF'
## Documentation
**Getting Started**
- [Home](Home)
- [Implementation Guide](Implementation-Guide)
**Design System**
- [Design Tokens](Design-Tokens)
- [Live Demo](https://jonmatum.github.io/react-mfe-shell/)
**Deployment**
- [GitHub Pages Setup](GitHub-Pages-Setup)
**Reference**
- [Documentation Index](Documentation-Index)
---
**Quick Install**
```bash
npm install @jonmatum/react-mfe-shell
```
EOF
- name: Commit and push wiki changes
run: |
cd wiki
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
# Add all changes
git add .
# Check if there are changes to commit
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "docs: sync documentation from main repository
Auto-sync triggered by commit: ${{ github.sha }}
Updated: $(date -u +"%Y-%m-%d %H:%M:%S UTC")"
git push
fi