-
Notifications
You must be signed in to change notification settings - Fork 2
75 lines (63 loc) · 2.36 KB
/
Copy pathsync-docs.yml
File metadata and controls
75 lines (63 loc) · 2.36 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
name: Sync Documentation from bd Tracker
on:
push:
branches:
- main
- develop
workflow_dispatch: # Allow manual trigger
permissions:
contents: write # Allow workflow to push commits
jobs:
sync-docs:
name: Auto-sync planning documents
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for accurate git operations
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: true
- name: Set up bd (Beads)
run: |
# Install bd if not available
if ! command -v bd &> /dev/null; then
echo "Installing bd (Beads) issue tracker..."
# Add installation commands here when bd has a proper installer
# For now, assume bd is available or installed via package
fi
bd --version || echo "bd not installed, will use existing files"
- name: Export Current Sprint
run: |
chmod +x ./scripts/export-current-sprint.sh
./scripts/export-current-sprint.sh
continue-on-error: true
- name: Export Implementation Plan
run: |
chmod +x ./scripts/export-implementation-plan.sh
./scripts/export-implementation-plan.sh
continue-on-error: true
- name: Check for changes
id: check_changes
run: |
git diff --quiet CURRENT_SPRINT.md IMPLEMENTATION_PLAN.md || echo "changes=true" >> $GITHUB_OUTPUT
- name: Commit and push if changed
if: steps.check_changes.outputs.changes == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add CURRENT_SPRINT.md IMPLEMENTATION_PLAN.md
git commit -m "docs: auto-sync planning docs from bd tracker
Auto-generated by GitHub Actions workflow.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Summary
run: |
if [ "${{ steps.check_changes.outputs.changes }}" == "true" ]; then
echo "✅ Documentation synced successfully"
else
echo "ℹ️ No changes detected - documentation already up to date"
fi