Skip to content

fix(dashboard): ensure transcript entries are fetched when stream tab… #591

fix(dashboard): ensure transcript entries are fetched when stream tab…

fix(dashboard): ensure transcript entries are fetched when stream tab… #591

name: Post-merge rebuild
on:
push:
branches:
- develop
concurrency:
group: post-merge-rebuild-${{ github.ref }}
cancel-in-progress: true
jobs:
rebuild:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 1
- uses: actions/setup-node@v6
with:
node-version: '22'
cache: npm
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Verify dist/ is fresh
run: |
if [ ! -d "dist" ] || [ -z "$(find dist -name '*.js' -newer package-lock.json)" ]; then
echo "::error::dist/ is empty or stale after build"
exit 1
fi
echo "dist/ rebuilt successfully ($(find dist -name '*.js' | wc -l) JS files)"
- name: Run smoke tests
run: npm run test:smoke
- name: Commit dist if changed
run: |
set -e
if [ -n "$(git status --porcelain --untracked-files=no -- dist)" ]; then
git config user.name "aegis-bot[bot]"
git config user.email "aegis-bot[bot]@users.noreply.github.com"
git add -A dist
git commit -m "chore(dist): rebuild after merge to develop [skip ci]"
git push origin HEAD:develop
else
echo "No dist changes to commit"
fi
deploy:
name: Optional deploy to host
runs-on: ubuntu-latest
needs: rebuild
if: ${{ vars.DEPLOY_HOST != '' }}
environment: deploy
steps:
- name: Deploy and restart over SSH
uses: appleboy/ssh-action@v1.2.5
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_SSH_KEY }}
port: ${{ secrets.DEPLOY_PORT || '22' }}
script: |
set -e
cd "${{ secrets.DEPLOY_PATH }}" || exit 1
git fetch origin develop
git checkout develop
git reset --hard origin/develop
npm ci
npm run build
sudo systemctl reset-failed aegis || true
sudo systemctl restart aegis