diff --git a/.github/workflows/frontcicd.yml b/.github/workflows/frontcicd.yml index 9946b12..970e15d 100644 --- a/.github/workflows/frontcicd.yml +++ b/.github/workflows/frontcicd.yml @@ -2,6 +2,9 @@ name: Test CI trigger on: [push] +permissions: + contents: write + jobs: frontend-build-and-test: runs-on: ubuntu-latest @@ -26,62 +29,3 @@ jobs: - name: Build Angular app run: npm run build working-directory: ./ - test: - runs-on: ubuntu-latest - services: - postgres: - image: postgres:latest - env: - POSTGRES_USER: sanalyz - POSTGRES_PASSWORD: sanalyz - POSTGRES_DB: sanalyz - ports: - - 5432:5432 - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up JDK 21 - uses: actions/setup-java@v3 - with: - java-version: '21' - distribution: 'temurin' - cache: 'maven' - - - name: Run tests - run: mvn test - working-directory: ./API - - - gh-pages-deploy: - runs-on: ubuntu-latest - needs: frontend-build-and-test - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: '21' - - - name: Build Angular app - run: | - npm install - npm run build - working-directory: ./ - - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v4 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./ - - deploy: - runs-on: ubuntu-latest - needs: [frontend-build-and-test, gh-pages-deploy] - steps: - - name: Final deployment - run: echo "Deployment done"