Skip to content

Commit 33f97bb

Browse files
authored
Create deploy.yml
Add deployment workflow for compose multiplatform
1 parent 3b765ce commit 33f97bb

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Deploy WasmJS App to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Trigger the workflow on pushes to the main branch
7+
workflow_dispatch: # Allow manual triggering
8+
9+
permissions:
10+
contents: read # Required to fetch the repository content
11+
pages: write # Allow deployment to GitHub Pages
12+
id-token: write # Required by actions/configure-pages
13+
14+
jobs:
15+
build-and-deploy:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Set up JDK 21
22+
uses: actions/setup-java@v4
23+
with:
24+
distribution: 'temurin'
25+
java-version: '21'
26+
27+
- name: Grant execute permission for gradlew
28+
run: chmod +x gradlew
29+
30+
- name: Build WasmJS App
31+
run: ./gradlew :composeApp:wasmJsBrowserDistribution
32+
33+
- name: Configure GitHub Pages
34+
uses: actions/configure-pages@v5
35+
36+
- name: Upload GitHub Pages artifact
37+
uses: actions/upload-pages-artifact@v3
38+
with:
39+
path: ./composeApp/build/dist/wasmJs/productionExecutable
40+
41+
# 7. Deploy to GitHub Pages
42+
- name: "Deploy to GitHub Pages"
43+
id: deployment
44+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)