Setup deploy web app for KMP lib wizard #37
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
name: Test -> Production Build -> Deploy | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
test-and-build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2.3.1 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }} | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Test | |
run: | | |
./gradlew check | |
- name: Upload Reports | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Test-Reports | |
path: build/reports | |
if: always() | |
- name: Build | |
run: | | |
./gradlew jsBrowserProductionWebpack -PwizardType=kmp | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@4.1.5 | |
with: | |
branch: gh-pages | |
folder: build/dist/js/productionExecutable |