Merge pull request #12 from dmp100/chore/#8-apply-GRA #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Deploy | |
| on: | |
| push: | |
| branches: [ develop ] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Setup Java 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: 'gradle' | |
| - name: Setup Node.js 20 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: webApp/package-lock.json | |
| - name: Make gradlew executable | |
| run: chmod +x gradlew | |
| - name: Build Shared module | |
| run: | | |
| echo "🔨 Building Kotlin Shared module for JS..." | |
| ./gradlew :shared:jsBrowserProductionLibraryDistribution --no-daemon | |
| echo "✅ Shared build complete!" | |
| - name: Build WebApp | |
| working-directory: ./webApp | |
| run: | | |
| echo "📦 Installing dependencies..." | |
| npm ci | |
| echo "🔨 Building React app..." | |
| npx vite build | |
| - name: Deploy to Netlify | |
| uses: nwtgck/actions-netlify@v2.0 | |
| with: | |
| publish-dir: './webApp/dist' | |
| production-branch: develop | |
| production-deploy: true | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| deploy-message: "🚀 Deploy from ${{ github.sha }}" | |
| enable-commit-comment: true | |
| env: | |
| NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_TOKEN }} | |
| NETLIFY_SITE_ID: ${{ secrets.NETLIFY_ID }} | |
| timeout-minutes: 5 |