Yaltopia-Ticket-Admin/.github/workflows/deploy.yml
debudebuye 529b4f9d37
Some checks failed
CI / Test & Build (18.x) (push) Has been cancelled
CI / Test & Build (20.x) (push) Has been cancelled
CI / Security Audit (push) Has been cancelled
Build Production / Build Production Artifacts (push) Has been cancelled
ci: Migrate deployment to Docker-based infrastructure
2026-02-26 11:45:46 +03:00

53 lines
1.2 KiB
YAML

name: Build Production
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build:
name: Build Production Artifacts
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test:run
- name: Build for production
run: npm run build:prod
env:
VITE_BACKEND_API_URL: ${{ secrets.VITE_BACKEND_API_URL_PROD }}
VITE_ENV: production
VITE_SENTRY_DSN: ${{ secrets.VITE_SENTRY_DSN }}
- name: Upload production artifacts
uses: actions/upload-artifact@v4
with:
name: production-build
path: dist/
retention-days: 30
- name: Build Docker image
run: docker build -t yaltopia-admin:${{ github.sha }} .
- name: Build success notification
if: success()
run: echo "Production build successful!"
- name: Build failure notification
if: failure()
run: echo "Production build failed!"