You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When enabled with `one-entry-mode: "true"`, this feature automatically updates your repository description with the Telegraph URL when exactly one markdown file is processed. This is perfect for single-page documentation repositories, personal profiles, or project showcases.
105
113
106
-
### How it works
114
+
### How One Entry Mode Works
107
115
108
116
1. **Enable the feature**: Set `one-entry-mode: "true"` in your workflow
109
117
2. **Single page detection**: When exactly one markdown file is processed, the action detects this scenario
110
118
3. **Repository update**: The GitHub repository description is automatically updated with the Telegraph page URL
111
119
4. **Permission handling**: Gracefully handles cases where the GitHub token lacks repository write permissions
@@ -126,7 +142,7 @@ When enabled with `one-entry-mode: "true"`, this feature automatically updates y
126
142
127
143
**Result**: If only `README.md` is processed, your repository description will be automatically updated to point to the Telegraph page (e.g., `https://telegra.ph/My-Profile-12-15`).
128
144
129
-
### Requirements
145
+
### One Entry Mode Requirements
130
146
131
147
- **GITHUB_TOKEN**: Must be provided via `env` for repository description updates
132
148
- The GitHub token must have `metadata: write` or `contents: write` permissions
@@ -137,17 +153,25 @@ When enabled with `one-entry-mode: "true"`, this feature automatically updates y
137
153
138
154
When enabled with `replace-existing-pages: "true"`, this feature prevents the creation of duplicate Telegraph pages by reusing existing pages with the same title. This is perfect for documentation that gets updated regularly, as it maintains consistent URLs for bookmarks and external links.
139
155
140
-
### How it works
156
+
### How Page Replacement Works
141
157
142
158
1. **Enable the feature**: Set `replace-existing-pages: "true"` in your workflow
143
159
2. **Provide consistent token**: A `telegraph-token` is **required** for this feature to work
144
160
3. **Title matching**: The action searches for existing pages with matching titles
145
161
4. **Content replacement**: If a match is found, the existing page content is replaced
146
162
5. **URL preservation**: The Telegraph page URL remains the same (e.g., `https://telegra.ph/My-Guide-12-15`)
@@ -162,7 +186,7 @@ When enabled with `replace-existing-pages: "true"`, this feature prevents the cr
162
186
163
187
**Result**: Each time the action runs, it will update the existing Telegraph pages instead of creating new ones, preserving URLs and preventing duplicates.
164
188
165
-
### Requirements
189
+
### Page Replacement Requirements
166
190
167
191
- **Telegraph token is mandatory**: This feature requires a consistent `telegraph-token` to access your existing pages
168
192
- **Title-based matching**: Pages are matched by title (case-insensitive)
@@ -228,6 +252,58 @@ The action creates a JSON file (default: `telegraph-pages.json`) that maps your
228
252
]
229
253
```
230
254
255
+
### Caching Strategy
256
+
257
+
**⚠️ Important**: The mapping file should **not** be committed to your repository as it can cause git conflicts in CI/CD workflows. Instead, use GitHub Actions cache to persist the mapping file between workflow runs.
258
+
259
+
#### Recommended Setup with GitHub Actions Cache
260
+
261
+
Using cache provides several benefits:
262
+
263
+
- ✅ **Avoids git conflicts** - No need to commit mapping files
0 commit comments