GitHub Action
Publish KMP Web App To GitHub Pages
v1.0.0
Latest version
This GitHub Action allows you to easily publish a Kotlin Multiplatform (KMP) Web Application to GitHub Pages with minimal configuration.
- Builds Kotlin/JS web application
- Configures GitHub Pages
- Uploads static files
- Deploys to GitHub Pages
- Provides deployment URL as output
- Kotlin Multiplatform Project
- Gradle build system
- GitHub Pages enabled in repository settings
- name: Publish KMP Web App To GitHub Pages
uses: openMF/[email protected]
name: Deploy Web App
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- uses: actions/checkout@v4
- name: Publish Web App
uses: openMF/[email protected]
with:
web_package_name: 'your-web-module-name'
- Description: Name of the web package/module in your Kotlin Multiplatform project
- Required:
true
- Type:
string
- Example:
'web'
,'webApp'
- Description: URL of the deployed GitHub Pages site
- Type:
string
- Example:
https://yourusername.github.io/repository-name/
permissions:
pages: write # Allows deployment to GitHub Pages
id-token: write # Enables secure token-based deployment
- Ensure your Gradle build generates JS distribution in the expected path
- Verify GitHub Pages is enabled in repository settings
- Check Gradle build script for correct JS distribution task
- Action uses
jsBrowserDistribution
Gradle task - Uploads files from
build/dist/js/productionExecutable/
- Supports single Kotlin Multiplatform Web module
Contributions and improvements are welcome! Please open an issue or submit a pull request.