From 8b5c52dd1ec80cf464f2ad1c6d7893399ffca1bc Mon Sep 17 00:00:00 2001 From: Jose Henrique Date: Fri, 10 Jul 2026 22:53:05 -0300 Subject: [PATCH] fixing pipeline --- .gitea/workflows/pull-request.yaml | 9 ++++++++- project-context.md | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/pull-request.yaml b/.gitea/workflows/pull-request.yaml index 330a317..3260250 100644 --- a/.gitea/workflows/pull-request.yaml +++ b/.gitea/workflows/pull-request.yaml @@ -36,6 +36,7 @@ jobs: - name: Prepare archive run: | + mkdir vision-start mv dist vision-start/ mv extension vision-start/ mv manifest.json vision-start/ @@ -76,7 +77,13 @@ jobs: name: pr-release-zip - name: Unpack build artifact - run: unzip -o -q ${{ env.ARCHIVE_NAME }} + run: | + unzip -o -q ${{ env.ARCHIVE_NAME }} + if [ ! -d dist ]; then + echo "The build artifact does not contain dist/." + unzip -l ${{ env.ARCHIVE_NAME }} + exit 1 + fi - name: Install Playwright Chromium run: npx playwright install --with-deps chromium diff --git a/project-context.md b/project-context.md index 5c9b25b..f29b020 100644 --- a/project-context.md +++ b/project-context.md @@ -213,7 +213,7 @@ Build, then combine `dist/` + `manifest.json` into a folder and "Load unpacked" ### CI/CD (Gitea Actions) - `release.yaml` validates each `vX.Y.Z` tag and replaces tracked `v0.0.0`/`0.0.0` placeholders in each build checkout before producing the extension archive and production image. -- **`pull-request.yaml`** — Triggers on pull request open, reopen, and synchronization. It builds and uploads a PR extension archive, unpacks that archive in a separate Playwright job to generate the three demo screenshots, and uploads both artifacts. For same-repository PRs, it maintains one Gitea PR comment with inline image attachments; fork PRs retain artifacts but skip the comment because their workflow token is read-only. +- **`pull-request.yaml`** — Triggers on pull request open, reopen, and synchronization. It builds and uploads a PR extension archive containing `dist/`, unpacks that archive in a separate Playwright job to generate the three demo screenshots, and uploads both artifacts. For same-repository PRs, it maintains one Gitea PR comment with inline image attachments; fork PRs retain artifacts but skip the comment because their workflow token is read-only. - After `deploy_vision_start` succeeds, `release.yaml` uses Playwright Chromium against the deployed production page and seeds each browser context from `scripts/demoData.json`. It regenerates `home.png`, `editing.png`, and `configuration.png` at exactly 1280×800, uploads them as artifacts, and attaches them as individual Gitea release assets. - **`main.yaml`** — Triggers on push to `main` (and `workflow_dispatch`). Builds, pushes a `staging` multi-arch (amd64/arm64) image to `git.ivanch.me/ivanch/vision-start:staging`, then SSH-deploys on the staging host via `docker compose up -d --force-recreate`. - **`release.yaml`** — Triggers on `v*` tags. Builds, zips `dist/` + `manifest.json` as `vision-start-.zip`, runs `scripts/check_virustotal.sh` against it (publishes analysis URL + detection ratio on the release body), creates a Gitea release, pushes a `latest` multi-arch image, and SSH-deploys to production.