Skip to content

Commit

Permalink
Add website publishing GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamsinghshubham777 committed Dec 12, 2024
1 parent 72e7712 commit e9c9ad1
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Kotlin/WASM Build and Deploy

on:
push:
branches: [main]
workflow_dispatch: # Allows manual triggering

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Java JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'

- name: Setup Gradle and build project
uses: gradle/gradle-build-action@v3

- name: Grant Permission to Execute Gradle
run: chmod +x gradlew

- name: Generate WASM distribution
run: ./gradlew wasmJsBrowserDistribution

- name: Deploy to Vercel
uses: amondnet/vercel-action@v25
with:
vercel-args: '--prod'
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
vercel-token: ${{ secrets.VERCEL_TOKEN }}
working-directory: ./build/dist/wasmJs/productionExecutable

0 comments on commit e9c9ad1

Please sign in to comment.