diff --git a/.github/web_build.yml b/.github/web_build.yml new file mode 100644 index 00000000..3d2619ec --- /dev/null +++ b/.github/web_build.yml @@ -0,0 +1,43 @@ +name: WebDeployment + +on: + push: + branches: + - main + +env: + CI: true + +jobs: + WebDeployment: + name: WebDeployment + runs-on: macos-13 + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Set up Java + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: '17' + + - name: Validate Gradle Wrapper + uses: gradle/wrapper-validation-action@v1 + + - name: Build with Gradle + run: ./gradlew :webApp:jsBrowserProductionWebpack + + - name: Move Output to Directory + run: | + mkdir distribution + mv webApp/build/dist/js/productionExecutable/* distribution/ + + # Commit and push the directory to a specified branch (e.g., "output-branch") + - name: Commit and Push to Branch + run: | + git config user.name "GitHub Actions" + git config user.email "actions@github.com" + git add distribution/ + git commit -m "Add output from build" + git push -f origin HEAD:deploy-branch \ No newline at end of file diff --git a/shared/src/commonMain/kotlin/com/bumble/livemosaic/appyx/component/messages/LinesOfMessagesVisualisation.kt b/shared/src/commonMain/kotlin/com/bumble/livemosaic/appyx/component/messages/LinesOfMessagesVisualisation.kt index 9c0cb593..128f6292 100644 --- a/shared/src/commonMain/kotlin/com/bumble/livemosaic/appyx/component/messages/LinesOfMessagesVisualisation.kt +++ b/shared/src/commonMain/kotlin/com/bumble/livemosaic/appyx/component/messages/LinesOfMessagesVisualisation.kt @@ -87,7 +87,7 @@ class LinesOfMessagesVisualisation( val mappedHalfEntryHeight = effectiveEntrySize.height / (transitionBounds.heightDp - effectiveEntrySize.height) val horizontalBias = mapValueRange( - value = transitionBounds.widthDp.value / 2f - halfEffectiveEntrySize.width.value * ((elements.size / 2f).nextUp() + value = transitionBounds.widthDp.value / 2f - halfEffectiveEntrySize.width.value * ((elements.size / 2.0).nextUp() .roundToInt()) + index * halfEffectiveEntrySize.width.value, fromRangeMin = 0f, fromRangeMax = transitionBounds.widthDp.value - effectiveEntrySize.width.value, diff --git a/shared/src/jsMain/kotlin/com/bumble/livemosaic/imageloader/EmbeddableResourceImage.kt b/shared/src/jsMain/kotlin/com/bumble/livemosaic/imageloader/EmbeddableResourceImage.kt index 15425ee5..ca11a47b 100644 --- a/shared/src/jsMain/kotlin/com/bumble/livemosaic/imageloader/EmbeddableResourceImage.kt +++ b/shared/src/jsMain/kotlin/com/bumble/livemosaic/imageloader/EmbeddableResourceImage.kt @@ -4,7 +4,7 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.layout.ContentScale -private const val EMBED_URL = "appyx/where/hosted/sample" +private const val EMBED_URL = "https://github.com/bumble-tech/live-mosaic/blob/deploy-branch/distribution/" @Composable actual fun EmbeddableResourceImage(