Skip to content

Update README.md

Update README.md #27

# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Website
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
jobs:
# Build job
build:
name: Build and Deploy Website
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Create Deployment Folder
run: mkdir -p ${{ github.workspace }}/build/deployment
- name: Copy Welcome screen to Deployment Folder
run: cp -a ${{ github.workspace }}/webapp/welcomeScreen/. ${{ github.workspace }}/build/deployment/
- name: Build WebAssembly site
run: ./gradlew :webapp:wasmApp:wasmJsBrowserDevelopmentExecutableDistribution
- name: Copy Webassembly to Deployment Folder
run: cp -a ${{ github.workspace }}/webapp/wasmApp/build/dist/wasmJs/developmentExecutable/. ${{ github.workspace }}/build/deployment/wasm/
- name: Build JavaScript site
run: ./gradlew :webapp:jsApp:jsBrowserDevelopmentExecutableDistribution
- name: Copy JavaScript to Deployment Folder
run: cp -a ${{ github.workspace }}/webapp/jsApp/build/dist/js/developmentExecutable/. ${{ github.workspace }}/build/deployment/js/
- name: Copy common resources to Deployment Folder
run: cp -a ${{ github.workspace }}/common/src/commonMain/resources/. ${{ github.workspace }}/build/deployment/
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v1
with:
path: ${{ github.workspace }}/build/deployment
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1