Skip to content

Commit 281bb9e

Browse files
committed
feat : githubAction WebApp, Shared CICD
1 parent 203b250 commit 281bb9e

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Build and Deploy
2+
3+
on:
4+
push:
5+
branches: [ develop ]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-22.04
10+
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v3
14+
15+
- name: Setup Java 17
16+
uses: actions/setup-java@v4
17+
with:
18+
java-version: '17'
19+
distribution: 'temurin'
20+
cache: 'gradle'
21+
22+
- name: Setup Node.js 20
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: '20'
26+
cache: 'npm'
27+
cache-dependency-path: webApp/package-lock.json
28+
29+
- name: Make gradlew executable
30+
run: chmod +x gradlew
31+
32+
- name: Build Shared module
33+
run: |
34+
echo "🔨 Building Kotlin Shared module..."
35+
./gradlew :shared:build --no-daemon
36+
echo "✅ Shared build complete!"
37+
38+
- name: Build WebApp
39+
working-directory: ./webApp
40+
run: |
41+
echo "📦 Installing dependencies..."
42+
npm ci
43+
echo "🔨 Building React app..."
44+
npm run build
45+
echo "✅ WebApp build complete!"
46+
47+
- name: Deploy to Netlify
48+
uses: nwtgck/[email protected]
49+
with:
50+
publish-dir: './webApp/dist'
51+
production-branch: develop
52+
production-deploy: true
53+
github-token: ${{ secrets.GITHUB_TOKEN }}
54+
deploy-message: "🚀 Deploy from ${{ github.sha }}"
55+
enable-commit-comment: true
56+
env:
57+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
58+
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_ID }}
59+
timeout-minutes: 5
60+

0 commit comments

Comments
 (0)