Skip to content

Commit db1db94

Browse files
authored
Merge pull request #25 from MSPRProject/nlauvray-patch-5
Update frontcicd.yml
2 parents ed66c98 + 5455e65 commit db1db94

1 file changed

Lines changed: 3 additions & 59 deletions

File tree

.github/workflows/frontcicd.yml

Lines changed: 3 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Test CI trigger
22

33
on: [push]
44

5+
permissions:
6+
contents: write
7+
58
jobs:
69
frontend-build-and-test:
710
runs-on: ubuntu-latest
@@ -26,62 +29,3 @@ jobs:
2629
- name: Build Angular app
2730
run: npm run build
2831
working-directory: ./
29-
test:
30-
runs-on: ubuntu-latest
31-
services:
32-
postgres:
33-
image: postgres:latest
34-
env:
35-
POSTGRES_USER: sanalyz
36-
POSTGRES_PASSWORD: sanalyz
37-
POSTGRES_DB: sanalyz
38-
ports:
39-
- 5432:5432
40-
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
41-
42-
steps:
43-
- name: Checkout code
44-
uses: actions/checkout@v3
45-
46-
- name: Set up JDK 21
47-
uses: actions/setup-java@v3
48-
with:
49-
java-version: '21'
50-
distribution: 'temurin'
51-
cache: 'maven'
52-
53-
- name: Run tests
54-
run: mvn test
55-
working-directory: ./API
56-
57-
58-
gh-pages-deploy:
59-
runs-on: ubuntu-latest
60-
needs: frontend-build-and-test
61-
steps:
62-
- name: Checkout code
63-
uses: actions/checkout@v3
64-
65-
- name: Set up Node.js
66-
uses: actions/setup-node@v4
67-
with:
68-
node-version: '21'
69-
70-
- name: Build Angular app
71-
run: |
72-
npm install
73-
npm run build
74-
working-directory: ./
75-
76-
- name: Deploy to GitHub Pages
77-
uses: peaceiris/actions-gh-pages@v4
78-
with:
79-
github_token: ${{ secrets.GITHUB_TOKEN }}
80-
publish_dir: ./
81-
82-
deploy:
83-
runs-on: ubuntu-latest
84-
needs: [frontend-build-and-test, gh-pages-deploy]
85-
steps:
86-
- name: Final deployment
87-
run: echo "Deployment done"

0 commit comments

Comments
 (0)