Commit 08903e3
authored
Refactor: Data directory structure, R2 backup, and fixed branch strategy in workflows (#29)
## Summary
This PR modernizes the SFS workflow architecture with three major
improvements:
1. Cleaner `data/` directory structure for all committed files
2. Cloudflare R2 as permanent backup for JSON files
3. Fixed branch strategy to eliminate branch proliferation
## Changes
### 📁 New Directory Structure
- **`data/sfs_json/`** - Source JSON files (committed to git + backed up
to R2)
- **`data/md-markers/`** - Markdown with selex tags (committed to git)
- **`output/`** - Generated files (ignored in git, HTML goes to R2)
### ☁️ Cloudflare R2 Backup
- All JSON files synced to R2 for permanent storage
- Provides redundancy and protection against git issues
- html-export uses smart fallback: git first, R2 if unavailable
### 🔄 Fixed Branch Strategy (NEW)
- **Eliminates branch proliferation**: Single branch
`workflow-artifact-data` instead of timestamped branches
- **Automatic PR lifecycle**: Old PR closed, new PR created on each
update
- **Workflow coordination**: Both fetch-sfs and upcoming-changes use
same branch
- **Temporal branches unchanged**: Date-range branches for historical
commits remain separate
### ⚙️ Configurable Git Commits
- **`enable_git_commit`** (default: true) - Enable/disable git commits
- **`branch_name`** (default: `workflow-artifact-data`) - Configurable
branch name
## Benefits
✅ **Better organization** - All source data in `data/`, generated in
`output/`
✅ **Permanent backup** - JSON files in both git and R2
✅ **No branch cleanup needed** - Single fixed branch, reused on each run
✅ **Simplified coordination** - All workflows use same branch
✅ **Clear naming** - `md-markers` shows selex tags included
## Before/After
| Aspect | Before | After |
|--------|--------|-------|
| Branch strategy | New timestamped branch each run | One fixed branch,
reused |
| Branch cleanup | Manual (never done) | Automatic (single branch) |
| Workflow coordination | Separate branches | Shared fixed branch |
| PR management | Many PRs accumulate | One PR per update cycle |
## Testing
- ✅ YAML syntax validated
- Ready for manual workflow trigger to test fixed branch behavior
- Temporal workflows remain independent and unaffected1 parent 25bf65b commit 08903e3
4 files changed
Lines changed: 147 additions & 28 deletions
File tree
- .github/workflows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
14 | 24 | | |
15 | 25 | | |
16 | 26 | | |
| |||
38 | 48 | | |
39 | 49 | | |
40 | 50 | | |
41 | | - | |
| 51 | + | |
42 | 52 | | |
43 | 53 | | |
44 | 54 | | |
45 | 55 | | |
46 | 56 | | |
47 | | - | |
| 57 | + | |
48 | 58 | | |
49 | 59 | | |
50 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
51 | 77 | | |
| 78 | + | |
52 | 79 | | |
53 | 80 | | |
54 | 81 | | |
55 | 82 | | |
56 | 83 | | |
| 84 | + | |
57 | 85 | | |
58 | 86 | | |
59 | 87 | | |
60 | 88 | | |
61 | | - | |
| 89 | + | |
62 | 90 | | |
63 | | - | |
| 91 | + | |
64 | 92 | | |
65 | 93 | | |
66 | 94 | | |
67 | 95 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
76 | 120 | | |
77 | 121 | | |
78 | 122 | | |
| |||
105 | 149 | | |
106 | 150 | | |
107 | 151 | | |
108 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
109 | 170 | | |
110 | 171 | | |
111 | | - | |
112 | | - | |
| 172 | + | |
| 173 | + | |
113 | 174 | | |
114 | 175 | | |
115 | 176 | | |
116 | | - | |
| 177 | + | |
117 | 178 | | |
118 | 179 | | |
119 | 180 | | |
120 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
121 | 185 | | |
122 | 186 | | |
123 | 187 | | |
124 | 188 | | |
125 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
126 | 193 | | |
127 | 194 | | |
128 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 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 | + | |
48 | 80 | | |
49 | 81 | | |
50 | 82 | | |
51 | | - | |
| 83 | + | |
52 | 84 | | |
53 | | - | |
| 85 | + | |
54 | 86 | | |
55 | 87 | | |
56 | 88 | | |
57 | 89 | | |
58 | 90 | | |
59 | 91 | | |
60 | | - | |
61 | | - | |
| 92 | + | |
| 93 | + | |
62 | 94 | | |
63 | 95 | | |
64 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
58 | 73 | | |
59 | 74 | | |
60 | 75 | | |
61 | 76 | | |
62 | 77 | | |
63 | 78 | | |
64 | | - | |
65 | | - | |
| 79 | + | |
| 80 | + | |
66 | 81 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
0 commit comments