Skip to content

Commit 528c69d

Browse files
pirateclaude
andcommitted
CI: stage users.txt before mining loop, not after
The 'Final deploy' step only runs once at the end. With the staging step there, interim deploys during the mining loop wouldn't have users.txt available, so the dynamic / handler wouldn't see queued users until the run finished. Move the cp into 'Determine target users' (right after pre-staging pirate.html) so every interim deploy publishes a fresh users.txt. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b81a478 commit 528c69d

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/mine-and-deploy.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ jobs:
135135
if [ -f stats.html ]; then
136136
cp stats.html cloudflare/public/pirate.html
137137
fi
138+
# Stage users.txt as a public asset so the Worker's dynamic /
139+
# handler can read it for the queued/mining list. Doing it here
140+
# (before the mining loop) means every interim deploy also has
141+
# a fresh users.txt available to the homepage.
142+
cp cloudflare/users.txt cloudflare/public/users.txt
138143
echo "Targets:"
139144
cat /tmp/targets.txt
140145
@@ -215,11 +220,6 @@ jobs:
215220
git diff --staged --quiet || git commit -m "Add ${{ inputs.user }} to users.txt [skip ci]"
216221
git push || echo "::warning::push failed (no commit permission?)"
217222
218-
# Deploy users.txt as a static asset so the Worker's dynamic /
219-
# handler can read it to build the queued/mining list.
220-
- name: Stage users.txt as a public asset
221-
run: cp cloudflare/users.txt cloudflare/public/users.txt
222-
223223
- name: Final deploy
224224
working-directory: cloudflare
225225
run: npx --yes wrangler@latest deploy

0 commit comments

Comments
 (0)