LifeMate — Personal, Family & Learning Companion
test(pages): reject default protected environment and non-QA branch deploy
davoodmehraban89 committed
Oct 15, 2026 at 09:58 UTC
eb133bcfae1c3b44bb933902463d657f57961dfb
1 file changed
+4
-1
backend/tests/github_pages_qa.test.js
+4
-1
@@ -43,7 +43,10 @@ test('GitHub Pages QA fails before an expensive Flutter build when Pages is off'
43
assert.match(workflow, /actions\/deploy-pages@v4/);
44
assert.match(workflow, /pages: write/);
45
assert.match(workflow, /id-token: write/);
46
- assert.match(workflow, /github-pages/);
46
+ assert.match(workflow, /name: lifeguide-pages-qa/);
47
+ assert.match(workflow, /if: github.event_name == 'push' && github.ref == 'refs\/heads\/infra\/lifeguide-github-pages-qa'/);
48
+ assert.doesNotMatch(workflow, /^\s+name: github-pages\s*$/m,
49
+ 'Do not weaken the existing protected main-only Pages environment');
50
assert(workflow.indexOf('actions/configure-pages@v5') <
51
workflow.indexOf('scripts/build-github-pages-qa.sh'),
52
'Configure-pages must fail before Flutter fetch/build when disabled.');