feat/pipeline-improvements #3

Merged
ivanch merged 8 commits from feat/pipeline-improvements into main 2026-07-11 21:07:16 +00:00
4 changed files with 21 additions and 4 deletions
Showing only changes of commit 552379b2a6 - Show all commits

View File

@@ -20,11 +20,17 @@ jobs:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: Setup required tools
run: sudo apt-get install zip jq curl -y
- name: Install JS dependencies
run: npm install
run: npm ci
- name: Run build
run: |

View File

@@ -22,6 +22,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: Set up required tools
run: sudo apt-get install zip wget -y
@@ -64,6 +65,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: Set up required tools
run: sudo apt-get install unzip -y
@@ -95,6 +97,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: pr-screenshots
retention-days: 30
path: |
screenshots/home.png
screenshots/editing.png

View File

@@ -31,11 +31,17 @@ jobs:
VERSION="${RELEASE_TAG#v}"
sed -i -e "s/\"version\": \"0\.0\.0\"/\"version\": \"$VERSION\"/" manifest.json
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: Setup required tools
run: sudo apt-get install zip jq curl -y
- name: Install JS dependencies
run: npm install
run: npm ci
- name: Run build
run: |
@@ -190,6 +196,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: Install JS dependencies
run: npm ci
@@ -206,6 +213,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: release-screenshots
retention-days: 30
path: |
screenshots/home.png
screenshots/editing.png

View File

@@ -213,8 +213,8 @@ 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 stamps the version into `manifest.json` (`"version": "0.0.0"` → the tag) 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 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.
- **`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 (screenshots are retained for 30 days). 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 (retained for 30 days), 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-<tag>.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.