Skip to content

Merge pull request #88 from birdup000/issue-82 #91

Merge pull request #88 from birdup000/issue-82

Merge pull request #88 from birdup000/issue-82 #91

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:

Check failure on line 17 in .github/workflows/ci-cd.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci-cd.yml

Invalid workflow file

You have an error in your yaml syntax on line 17
node-version: '20'
- name: Install dependencies
run: npm install
- name: Run Playwright tests
run: npm run test
- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: playwright-report
path: playwright-report/
retention-days: 30
build:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Frontend
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository }}/frontend:latest
ghcr.io/${{ github.repository }}/frontend:${{ github.sha }}
build-args: |
NEXT_PUBLIC_AGIXT_URL=http://agixt:7437
NEXT_PUBLIC_APP_URL=http://localhost:3000
deploy:
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Create .env file
run: |
echo "NEXT_PUBLIC_AGIXT_URL=http://agixt:7437" >> .env
echo "NEXT_PUBLIC_APP_URL=http://localhost:3000" >> .env
- name: Deploy with Docker Compose
run: |
# Create AGiXT network if it doesn't exist
docker network create agixt_default || true
# Pull and start the frontend
docker-compose pull
docker-compose up -d