@@ -17,13 +17,13 @@ concurrency:
1717 cancel-in-progress : true
1818
1919jobs :
20- classify :
20+ frontend :
2121 runs-on : ubuntu-latest
22- timeout-minutes : 3
22+ timeout-minutes : 12
2323 outputs :
2424 scope : ${{ steps.scope.outputs.scope }}
2525 steps :
26- - name : Checkout history for trusted path classification
26+ - name : Checkout exact production candidate and history
2727 uses : actions/checkout@v7
2828 with :
2929 fetch-depth : 0
@@ -43,28 +43,23 @@ jobs:
4343 fi
4444 git diff --name-only "$BEFORE_SHA" "$GITHUB_SHA" | node scripts/orbit-actions-scope.mjs
4545
46- frontend :
47- needs : classify
48- if : ${{ needs.classify.outputs.scope != 'docs' }}
49- runs-on : ubuntu-latest
50- timeout-minutes : 12
51- steps :
52- - name : Checkout exact production candidate
53- uses : actions/checkout@v7
54-
5546 - name : Set up Node
47+ if : ${{ steps.scope.outputs.scope != 'docs' }}
5648 uses : actions/setup-node@v7
5749 with :
5850 node-version : 24
5951 cache : npm
6052
6153 - name : Install dependencies
54+ if : ${{ steps.scope.outputs.scope != 'docs' }}
6255 run : npm ci
6356
6457 - name : Build and verify the production frontend once
58+ if : ${{ steps.scope.outputs.scope != 'docs' }}
6559 run : npm run verify:frontend:production
6660
6761 - name : Create the verified asset manifest
62+ if : ${{ steps.scope.outputs.scope != 'docs' }}
6863 run : |
6964 test "$(find dist/client -type f -path '*/.*' ! -path 'dist/client/.assetsignore' -print -quit)" = ''
7065 printf 'wrangler.json\n.dev.vars\n' \
7671 sha256sum --check production-assets.sha256
7772
7873 - name : Upload verified production assets
74+ if : ${{ steps.scope.outputs.scope != 'docs' }}
7975 uses : actions/upload-artifact@v6
8076 with :
8177 name : orbit-production-assets-${{ github.sha }}
@@ -88,39 +84,52 @@ jobs:
8884 retention-days : 1
8985
9086 backend :
91- needs : classify
9287 runs-on : ubuntu-latest
9388 timeout-minutes : 12
89+ outputs :
90+ scope : ${{ steps.scope.outputs.scope }}
9491 steps :
95- - name : Checkout backend candidate
96- if : ${{ needs.classify.outputs.scope == 'full' }}
92+ - name : Checkout backend candidate and history
9793 uses : actions/checkout@v7
94+ with :
95+ fetch-depth : 0
96+
97+ - name : Classify changed paths independently
98+ id : scope
99+ env :
100+ BEFORE_SHA : ${{ github.event.before }}
101+ EVENT_NAME : ${{ github.event_name }}
102+ run : |
103+ if [[ "$EVENT_NAME" == 'workflow_dispatch' || -z "$BEFORE_SHA" || "$BEFORE_SHA" =~ ^0+$ ]]; then
104+ printf 'scope=full\n' >> "$GITHUB_OUTPUT"
105+ exit 0
106+ fi
107+ git diff --name-only "$BEFORE_SHA" "$GITHUB_SHA" | node scripts/orbit-actions-scope.mjs
98108
99109 - name : Set up Node
100- if : ${{ needs.classify .outputs.scope == 'full' }}
110+ if : ${{ steps.scope .outputs.scope == 'full' }}
101111 uses : actions/setup-node@v7
102112 with :
103113 node-version : 24
104114 cache : npm
105115
106116 - name : Install dependencies
107- if : ${{ needs.classify .outputs.scope == 'full' }}
117+ if : ${{ steps.scope .outputs.scope == 'full' }}
108118 run : npm ci
109119
110120 - name : Verify D1, Worker, CLI and security behavior
111- if : ${{ needs.classify .outputs.scope == 'full' }}
121+ if : ${{ steps.scope .outputs.scope == 'full' }}
112122 run : npm run test:d1 && npm run orbit:test:cli
113123
114124 - name : Record frontend-only backend decision
115- if : ${{ needs.classify .outputs.scope != 'full' }}
125+ if : ${{ steps.scope .outputs.scope != 'full' }}
116126 run : echo 'No backend/security path changed; the fail-safe classifier selected frontend validation.'
117127
118128 deploy :
119129 needs :
120- - classify
121130 - frontend
122131 - backend
123- if : ${{ needs.frontend.result == 'success' && needs.backend.result == 'success' }}
132+ if : ${{ needs.frontend.result == 'success' && needs.backend.result == 'success' && needs.frontend.outputs.scope != 'docs' && needs.frontend.outputs.scope == needs.backend.outputs.scope }}
124133 runs-on : ubuntu-latest
125134 timeout-minutes : 8
126135 environment :
0 commit comments