Skip to content

Commit ff96d9f

Browse files
committed
Add GitHub Pages deployment workflow
1 parent 61db237 commit ff96d9f

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

.github/workflows/deploy-pages.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Deploy Texty Demo to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ master ] # Only run on main branch
6+
workflow_dispatch: # Allows manual triggering
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build-and-deploy:
19+
runs-on: ubuntu-latest
20+
environment:
21+
name: github-pages
22+
url: ${{ steps.deployment.outputs.page_url }}
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Set up JDK 22
29+
uses: actions/setup-java@v4
30+
with:
31+
java-version: '22'
32+
distribution: 'temurin'
33+
34+
- name: Setup Gradle
35+
uses: gradle/gradle-build-action@v3
36+
37+
- name: Build WASM distribution
38+
run: ./gradlew :sample:composeApp:wasmJsBrowserDistribution
39+
40+
- name: Setup Pages
41+
uses: actions/configure-pages@v4
42+
43+
- name: Upload artifact
44+
uses: actions/upload-pages-artifact@v3
45+
with:
46+
path: 'sample/composeApp/build/dist/wasmJs/productionExecutable'
47+
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)