Skip to content

Commit 28d4b16

Browse files
authored
Docs(troubleshooting): Add PR not created section for GitHub Action (#216)
1 parent 1423c4e commit 28d4b16

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

getting_started/troubleshooting.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,45 @@ translate -l "ko" -img
184184
translate -l "ko" -md
185185
```
186186

187+
## 7. GitHub Action ran but no Pull Request (PR) was created
188+
189+
**Symptom:** The workflow logs for `peter-evans/create-pull-request` show:
190+
191+
> Branch 'update-translations' is not ahead of base 'main' and will not be created
192+
193+
**Likely causes:**
194+
- **No changes detected:** The translation step produced no diffs (repo already up to date).
195+
- **Ignored outputs:** `.gitignore` excludes files you expect to commit (e.g., `*.ipynb`, `translations/`, `translated_images/`).
196+
- **add-paths mismatch:** The paths provided to the action don’t match actual output locations.
197+
- **Workflow logic/conditions:** The translation step exited early or wrote to unexpected directories.
198+
199+
**How to fix / verify:**
200+
1. **Confirm outputs exist:** After translation, check the workspace has new/changed files in `translations/` and/or `translated_images/`.
201+
- If translating notebooks, ensure `.ipynb` files are actually written under `translations/<lang>/...`.
202+
2. **Review `.gitignore`:** Do not ignore generated outputs. Ensure you are NOT ignoring:
203+
- `translations/`
204+
- `translated_images/`
205+
- `*.ipynb` (if translating notebooks)
206+
3. **Ensure add-paths matches outputs:** Use a multiline value and include both folders if applicable:
207+
```yaml
208+
with:
209+
add-paths: |
210+
translations/
211+
translated_images/
212+
```
213+
4. **Force a PR for debugging:** Temporarily allow empty commits to confirm wiring is correct:
214+
```yaml
215+
with:
216+
commit-empty: true
217+
```
218+
5. **Run with debug:** Add `-d` to the translate command to print what files were discovered and written.
219+
6. **Permissions (GITHUB_TOKEN):** Ensure the workflow has write permissions for creating commits and PRs:
220+
```yaml
221+
permissions:
222+
contents: write
223+
pull-requests: write
224+
```
225+
187226
## Quick Debugging Checklist
188227

189228
When troubleshooting translation issues:

0 commit comments

Comments
 (0)