promote-production.yml triggered on push to main independently of qa.yml, with no branch protection configured on the repo - a failing QA run (npm audit, static security tests, e2e) never blocked production. Switch it to the same workflow_run pattern deploy-timeweb.yml already uses: only promote the exact commit QA just passed. Also removes public/core/data-layer-v1770/1771/1772.js: only v1773 is ever loaded (index.html, performance.js's loadDataLayer, service-worker cache all reference v1773 only) - the older three were dead weight shipped to every visitor. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
35 lines
874 B
YAML
35 lines
874 B
YAML
name: Caterium Direct Production
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: ["Caterium QA"]
|
|
types: [completed]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
concurrency:
|
|
group: caterium-production-promotion
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
promote:
|
|
if: >-
|
|
github.event_name == 'workflow_dispatch' ||
|
|
(github.event.workflow_run.conclusion == 'success' &&
|
|
github.event.workflow_run.head_branch == 'main')
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout tested main revision
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || 'main' }}
|
|
fetch-depth: 0
|
|
|
|
- name: Publish tested revision to production branch
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
git push origin HEAD:refs/heads/production
|