chore: обновить CI для dev-ветки и актуализировать CONTRIBUTING.md
All checks were successful
CI/CD Pipeline / build (push) Successful in 17s
CI/CD Pipeline / version (push) Has been skipped
CI/CD Pipeline / docker (push) Has been skipped
CI/CD Pipeline / deploy (push) Has been skipped

- Добавлен триггер dev в CI со сборочным job (generate + docs:build + build)
- Убраны устаревшие шаги: npm run docs, коммит generated/, README_RU.md
- Прод-пайплайн: build → version (тег) → docker → deploy
- CONTRIBUTING.md переписан под текущую структуру проекта
This commit is contained in:
2026-05-01 21:15:24 +03:00
parent 1af27795ed
commit ced6a07398
2 changed files with 76 additions and 179 deletions

View File

@@ -2,12 +2,37 @@ name: CI/CD Pipeline
on:
push:
branches: [main]
branches: [main, dev]
jobs:
docs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
- name: Установка зависимостей
run: npm ci
- name: Генерация артефактов
run: npm run generate
- name: Сборка документации
run: npm run docs:build
- name: Сборка лендинга
run: npm run build
version:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, '[skip ci]')
outputs:
version: ${{ steps.version.outputs.version }}
steps:
@@ -16,11 +41,6 @@ jobs:
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
- name: Версия из package.json
id: version
run: |
@@ -28,23 +48,6 @@ jobs:
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Версия: $VERSION"
- name: Генерация docs
run: |
npm ci
npm run docs
- name: Коммит generated/
run: |
git config user.name "CI Bot"
git config user.email "ci@gromlab.ru"
git add generated/ README_RU.md
if git diff --cached --quiet; then
echo "Нет изменений, пропуск"
else
git commit -m "docs: обновить generated (${{ steps.version.outputs.version }}) [skip ci]"
git push origin main
fi
- name: Создать тег
run: |
VERSION=${{ steps.version.outputs.version }}
@@ -58,7 +61,7 @@ jobs:
docker:
runs-on: ubuntu-latest
needs: docs
needs: version
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- name: Checkout
@@ -92,7 +95,7 @@ jobs:
type=ref,event=branch
type=sha,prefix=
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=${{ needs.docs.outputs.version }}
type=raw,value=${{ needs.version.outputs.version }}
- name: Build and push
uses: docker/build-push-action@v5
@@ -104,7 +107,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION_TAG=${{ needs.docs.outputs.version }}
VERSION_TAG=${{ needs.version.outputs.version }}
provenance: false
sbom: false