Barazo default frontend barazo.forum

fix(ci): route deploy through lockfile sync to prevent stale lockfile (#157)

Replace the two-step dispatch (deploy + sync in parallel) with a
single dispatch to barazo-workspace's sync-lockfile workflow. The
sync workflow regenerates the lockfile if needed, then triggers the
deploy with the correct refs.

This fixes a race condition where the deploy started with a stale
workspace lockfile before the sync had committed the updated one,
causing frozen-lockfile failures when new dependencies were added.

authored by

Guido X Jansen and committed by
GitHub
e1aa3589 9308cfae

+6 -11
+6 -11
.github/workflows/deploy-staging.yml
··· 12 12 name: Trigger Staging Deploy 13 13 runs-on: ubuntu-latest 14 14 steps: 15 - - name: Dispatch to barazo-deploy 15 + # Sync the workspace lockfile first, then let it trigger the deploy. 16 + # This avoids a race condition where the deploy starts with a stale 17 + # lockfile before the sync has committed the updated one. 18 + - name: Sync lockfile and deploy 16 19 uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4.0.1 17 20 with: 18 21 token: ${{ secrets.DEPLOY_PAT }} 19 - repository: barazo-forum/barazo-deploy 20 - event-type: deploy-staging 22 + repository: barazo-forum/barazo-workspace 23 + event-type: sync-lockfile 21 24 client-payload: | 22 25 { 23 26 "trigger_repo": "barazo-web", 24 27 "api_ref": "main", 25 28 "web_ref": "${{ github.sha }}" 26 29 } 27 - 28 - - name: Sync workspace lockfile 29 - continue-on-error: true 30 - uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4.0.1 31 - with: 32 - token: ${{ secrets.DEPLOY_PAT }} 33 - repository: barazo-forum/barazo-workspace 34 - event-type: sync-lockfile