Skip to content

docs: expand AI product and team process answers #2

docs: expand AI product and team process answers

docs: expand AI product and team process answers #2

name: Expand AI product processes docs (temporary)
on:
pull_request:
permissions:
contents: write
jobs:
expand-ai-product-processes:
runs-on: ubuntu-latest
steps:
- name: Checkout PR branch
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
- name: Install dependencies
run: npm ci
- name: Expand product processes answers
run: |
python <<'PY'
from pathlib import Path
import re
path = Path('src/pages/ai/index.md')
replacement = Path('.github/ai-product-processes-replacement.md').read_text().rstrip() + '\n\n'
text = path.read_text()
pattern = r'### Продукт и командные процессы\n.*?(?=### Обучение и карьера\n)'
updated, count = re.subn(pattern, replacement, text, count=1, flags=re.S)
if count != 1:
raise SystemExit(f'Expected one product processes section, found {count}')
path.write_text(updated)
PY
- name: Format AI page
run: npx prettier src/pages/ai/index.md --write
- name: Commit formatted page
run: |
if git diff --quiet -- src/pages/ai/index.md; then
exit 0
fi
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add src/pages/ai/index.md
git commit -m 'docs: expand AI product process answers'
git push origin HEAD:${{ github.event.pull_request.head.ref }}