Publish three learning skill articles with one shared Xiaohongshu-style cover
PROMPT Docker CI and deployment / verify-and-deploy (push) Has been cancelled
PROMPT Docker CI and deployment / verify-and-deploy (push) Has been cancelled
This commit is contained in:
@@ -67,6 +67,7 @@ install -d -o root -g root -m 0700 /var/lib/prompt/backups
|
||||
compose exec -T postgres pg_dump -U prompt -d prompt -Fc > "/var/lib/prompt/backups/$(date -u +%Y%m%dT%H%M%S)-$RELEASE_SHA.dump"
|
||||
find /var/lib/prompt/backups -name '*.dump' -printf '%T@ %p\n' | sort -rn | tail -n +11 | cut -d' ' -f2- | xargs -r rm --
|
||||
compose run --rm --no-deps migrate
|
||||
compose run --rm --no-deps publish
|
||||
CUTOVER=1
|
||||
# One-time migration: finish a current host worker job before switching the web port.
|
||||
if [ "$LEGACY_WORKER" -eq 1 ] || [ "$LEGACY_WORKER_ENABLED" -eq 1 ]; then systemctl disable --now prompt-worker.service; fi
|
||||
@@ -75,6 +76,7 @@ compose up -d --no-build --wait --wait-timeout 180 web worker
|
||||
compose exec -T web node container-health.mjs
|
||||
compose exec -T web node -e "fetch('http://127.0.0.1:3000/').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))"
|
||||
compose exec -T worker sh -c 'test "$(id -u)" -ne 0 && ffmpeg -version >/dev/null'
|
||||
compose exec -T web node -e "(async()=>{const feed=await fetch('http://127.0.0.1:3000/api/feed?section=articles').then(r=>r.json());const slugs=['learning-skills-notes','learning-skills-teaching','learning-skills-english'];for(const slug of slugs){const post=feed.posts.find(p=>p.slug===slug);if(!post)throw Error('Published article missing: '+slug);const res=await fetch('http://127.0.0.1:3000/p/'+slug);if(!res.ok)throw Error('Article unavailable: '+slug)}if(new Set(feed.posts.filter(p=>slugs.includes(p.slug)).map(p=>p.cover_asset_id)).size!==1)throw Error('Series must share one cover');console.log('Verified three published article pages and their shared cover')})().catch(e=>{console.error(e.message);process.exit(1)})"
|
||||
ln -sfn "$RELEASE_DIR" "$APP_ROOT/.current.next"
|
||||
mv -Tf "$APP_ROOT/.current.next" "$APP_ROOT/current"
|
||||
compose ps
|
||||
|
||||
Reference in New Issue
Block a user