Skip to content

Commit 9648b74

Browse files
committed
Update ci.yml
1 parent d047f74 commit 9648b74

File tree

1 file changed

+50
-11
lines changed

1 file changed

+50
-11
lines changed

.github/workflows/ci.yml

Lines changed: 50 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: CI/CD
22

33
on:
44
push:
@@ -7,29 +7,68 @@ on:
77
branches: [ main, develop ]
88

99
jobs:
10-
test:
10+
install:
1111
runs-on: ubuntu-latest
1212

13-
strategy:
14-
matrix:
15-
node-version: [24]
16-
1713
steps:
1814
- name: Checkout repository
1915
uses: actions/checkout@v4
2016

21-
- name: Setup Node.js ${{ matrix.node-version }}
17+
- name: Setup Node.js 24
2218
uses: actions/setup-node@v4
2319
with:
24-
node-version: ${{ matrix.node-version }}
20+
node-version: 24
2521
cache: 'npm'
2622

2723
- name: Install dependencies
2824
run: npm ci
2925

26+
- name: Cache node_modules
27+
uses: actions/cache@v4
28+
with:
29+
path: node_modules
30+
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
31+
32+
build:
33+
runs-on: ubuntu-latest
34+
needs: install
35+
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v4
39+
40+
- name: Setup Node.js 24
41+
uses: actions/setup-node@v4
42+
with:
43+
node-version: 24
44+
cache: 'npm'
45+
46+
- name: Restore node_modules
47+
uses: actions/cache@v4
48+
with:
49+
path: node_modules
50+
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
51+
3052
- name: Build project
3153
run: npm run build
3254

33-
- name: Run tests
34-
run: npx playwright test
35-
if: success() || failure()
55+
- name: Upload build artifacts
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: build-files
59+
path: dist/
60+
61+
deploy:
62+
runs-on: ubuntu-latest
63+
needs: build
64+
if: github.ref == 'refs/heads/main'
65+
66+
steps:
67+
- name: Download build artifacts
68+
uses: actions/download-artifact@v4
69+
with:
70+
name: build-files
71+
path: dist/
72+
73+
- name: Deploy to production
74+
run: echo "Deploy step - configure with your deployment target"

0 commit comments

Comments
 (0)