Skip to content

Commit 7eab443

Browse files
authored
Merge pull request #31 from joreilly/github_pages
add github pages workflow
2 parents 3e31680 + 9f8a4b3 commit 7eab443

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build and Publish
2+
3+
# configure manual trigger
4+
on:
5+
workflow_dispatch:
6+
7+
jobs:
8+
build:
9+
name: Test and Build
10+
runs-on: ubuntu-latest
11+
steps:
12+
13+
# Setup Java 1.8 environment for the next steps
14+
- name: Setup Java
15+
uses: actions/setup-java@v1
16+
with:
17+
java-version: 17
18+
19+
# Check out current repository
20+
- name: Fetch Sources
21+
uses: actions/checkout@v2
22+
23+
# Build application
24+
- name: Test and Build
25+
run: ./gradlew :composeApp:wasmJsBrowserProductionWebpack
26+
27+
# - name: Copy "uninstantiated" file over (workaround for now)
28+
# run: cp compose-web/build/compileSync/wasmJs/main/productionExecutable/kotlin/chip8.uninstantiated.mjs compose-web/build/dist/wasmJs/productionExecutable
29+
30+
# If main branch update, deploy to gh-pages
31+
- name: Deploy
32+
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
33+
uses: JamesIves/[email protected]
34+
with:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
BRANCH: gh-pages # The branch the action should deploy to.
37+
FOLDER: composeApp/build/dist/wasmJs/productionExecutable # The folder the action should deploy.
38+
CLEAN: true # Automatically remove deleted files from the deploy branch

0 commit comments

Comments
 (0)