More work #31
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
# Deploy JS game to GitHub Pages | |
name: "🚀 Deploy JS" | |
on: | |
push: | |
branches: [ "main" ] | |
workflow_dispatch: | |
env: | |
JAVA_DISTRIBUTION: zulu | |
JAVA_VERSION: 21 | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
build: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- { uses: actions/checkout@v4 } | |
- { name: Set up JDK, uses: actions/setup-java@v3, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } } | |
- { name: Prepare Gradle, uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 } # v3.1.0 | |
#- { name: Buid JS bundle, run: ./gradlew browserReleaseEsbuild } | |
- { name: Buid JS bundle, run: ./gradlew browserReleaseWebpack } | |
- { name: Upload artifact, uses: actions/upload-pages-artifact@v3, with: { path: 'build/www' } } | |
- { name: Deploy 🚀 to GitHub Pages, id: deployment, uses: actions/deploy-pages@v4} |