fix(license): restore the ONLYOFFICE product logo and add the notices… #103
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Smoke the DEPLOYED site (edit.chaxus.com): the same core E2E suites the PR | |
| # gate runs against a local build, pointed at production. Catches what only | |
| # the real deployment can break -- CDN headers, gzip wasm delivery, service | |
| # worker rollout, stale assets. Manual + daily; red is a page. | |
| name: Production smoke | |
| on: | |
| # After every push to main: wait until the live site serves this commit's | |
| # build (Cloudflare Pages deploys from the same push), then smoke it, so a | |
| # deploy-only breakage is known within minutes instead of the next morning. | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| inputs: | |
| url: | |
| description: "Site to smoke" | |
| default: "https://edit.chaxus.com" | |
| schedule: | |
| - cron: "47 20 * * *" # 04:47 Asia/Shanghai, after the nightly corpus | |
| concurrency: | |
| group: prod-smoke | |
| cancel-in-progress: true | |
| jobs: | |
| smoke: | |
| name: Core E2E against production | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Set up the toolchain | |
| uses: ./.github/actions/setup | |
| with: | |
| browsers: chromium | |
| # On push: build the same commit and wait until production serves its | |
| # hashed entry asset (Vite hashes are content-derived, so an identical | |
| # build here yields the same asset name as the Pages build). Skipped for | |
| # schedule/dispatch runs, which smoke whatever is live. | |
| # | |
| # The asset to watch is the EDITOR's, taken from editor.html. `/` has | |
| # shipped no bundle since the route split (2026-08-16), so the old | |
| # `assets/index-*.js` grep against `dist/index.html` found nothing -- | |
| # and an empty expectation matched an empty answer on the first poll, | |
| # so this step reported "live after 20s" without waiting for anything. | |
| # Every smoke since has run against whatever happened to be deployed; | |
| # it only surfaced once a case could tell the builds apart. | |
| # | |
| # An empty ASSET is now a hard error rather than a vacuous pass: this | |
| # gate is worthless if it cannot name what it is waiting for. | |
| - name: Wait for the deploy of this commit | |
| if: github.event_name == 'push' | |
| env: | |
| PROD_URL: ${{ github.event.inputs.url || 'https://edit.chaxus.com' }} | |
| run: | | |
| sh ./bin/build.sh >/dev/null 2>&1 | |
| ASSET=$(grep -o 'assets/editor-[A-Za-z0-9_-]*\.js' dist/editor.html | head -1) | |
| if [ -z "$ASSET" ]; then | |
| echo "::error::no editor entry asset in dist/editor.html; the deploy gate cannot tell builds apart" | |
| exit 1 | |
| fi | |
| echo "expecting $ASSET" | |
| for i in $(seq 1 60); do | |
| LIVE=$(curl -s "$PROD_URL/editor" | grep -o 'assets/editor-[A-Za-z0-9_-]*\.js' | head -1) | |
| if [ "$LIVE" = "$ASSET" ]; then echo "live after $((i*20))s"; exit 0; fi | |
| sleep 20 | |
| done | |
| echo "::warning::production still serves $LIVE after 20 min; smoking what is live" | |
| - name: Smoke production | |
| env: | |
| PROD_URL: ${{ github.event.inputs.url || 'https://edit.chaxus.com' }} | |
| run: pnpm exec playwright test -c playwright.prod.config.ts --reporter=list | |
| - name: Upload report | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: playwright-report-prod | |
| path: playwright-report-prod/ | |
| retention-days: 14 |