-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add website publishing GitHub workflow
- Loading branch information
1 parent
72e7712
commit e9c9ad1
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
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 |