Skip to content

Commit aceda30

Browse files
authored
Create deploy.yml
1 parent 369af77 commit aceda30

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
on:
2+
push:
3+
branches: [ master ]
4+
workflow_dispatch:
5+
6+
concurrency:
7+
group: "deploy"
8+
cancel-in-progress: true
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
jobs:
16+
docs:
17+
environment:
18+
name: github-pages
19+
url: ${{ steps.deployment.outputs.page_url }}
20+
21+
runs-on: macos-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Copy CI gradle.properties
26+
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
27+
28+
- name: set up JDK
29+
uses: actions/setup-java@v4
30+
with:
31+
distribution: 'zulu'
32+
check-latest: true
33+
java-version: 23
34+
cache: 'gradle'
35+
36+
- name: Validate gradle wrapper
37+
uses: gradle/actions/wrapper-validation@v4
38+
39+
- name: Create local properties
40+
env:
41+
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }}
42+
run: echo "$LOCAL_PROPERTIES" | base64 --decode > local.properties
43+
44+
- name: Cache konan directory
45+
uses: actions/cache@v4
46+
with:
47+
path: ~/.konan
48+
key: ${{ runner.os }}-konan-${{ hashFiles('*.gradle.kts', 'buildSrc/*') }}
49+
restore-keys: |
50+
${{ runner.os }}-konan-
51+
52+
- uses: actions/setup-node@v4
53+
with:
54+
node-version: 23
55+
cache: npm
56+
cache-dependency-path: './docs/package-lock.json'
57+
58+
- name: Create sample app distributable
59+
run: ./gradlew wasmJsBrowserDistribution --no-configuration-cache
60+
61+
- name: Move assembled sample app to docs folder
62+
run: cp -r ./sample/build/dist/wasmJs/productionExecutable/ ./dist/
63+
64+
- name: Setup Pages
65+
uses: actions/configure-pages@v5
66+
67+
- name: Upload pages
68+
uses: actions/upload-pages-artifact@v3
69+
with:
70+
path: './dist/'
71+
72+
- name: Deploy to GitHub Pages
73+
id: deployment
74+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)