https://github.com/openmf/kmp-web-publish-action
https://github.com/openmf/kmp-web-publish-action
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/openmf/kmp-web-publish-action
- Owner: openMF
- Created: 2024-12-13T20:00:01.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-24T06:42:54.000Z (over 1 year ago)
- Last Synced: 2025-03-27T17:00:17.089Z (over 1 year ago)
- Size: 8.79 KB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Publish KMP Web App to GitHub Pages Action
## Overview
This GitHub Action allows you to easily publish a Kotlin Multiplatform (KMP) Web Application to GitHub Pages with minimal configuration.
## Features
- Builds Kotlin/JS web application
- Configures GitHub Pages
- Uploads static files
- Deploys to GitHub Pages
- Provides deployment URL as output
## Prerequisites
- Kotlin Multiplatform Project
- Gradle build system
- GitHub Pages enabled in repository settings
## Usage
```yaml
- name: Publish KMP Web App To GitHub Pages
uses: openMF/KMP-web-publish-action@v1.0.0
```
### Detailed Configuration
```yaml
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/KMP-web-publish-action@v1.0.0
with:
web_package_name: 'your-web-module-name'
```
## Inputs
### `web_package_name`
- **Description**: Name of the web package/module in your Kotlin Multiplatform project
- **Required**: `true`
- **Type**: `string`
- **Example**: `'web'`, `'webApp'`
## Outputs
### `page_url`
- **Description**: URL of the deployed GitHub Pages site
- **Type**: `string`
- **Example**: `https://yourusername.github.io/repository-name/`
## Permissions Required
```yaml
permissions:
pages: write # Allows deployment to GitHub Pages
id-token: write # Enables secure token-based deployment
```
## Troubleshooting
- 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
## Notes
- Action uses `jsBrowserDistribution` Gradle task
- Uploads files from `build/dist/js/productionExecutable/`
- Supports single Kotlin Multiplatform Web module
## Contributing
Contributions and improvements are welcome! Please open an issue or submit a pull request.