Skip to content

Update deploy-js.yml #7

Update deploy-js.yml

Update deploy-js.yml #7

Workflow file for this run

# Deploy JS game to GitHub Pages
name: Deploy JS
on:
push:
branches: [ "main" ]
workflow_dispatch:
env:
JAVA_DISTRIBUTION: zulu
JAVA_VERSION: 17
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
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/gradle-build-action@ef76a971e2fa3f867b617efd72f2fbd72cf6f8bc } # v2.8.0
- { name: Buid JS bundle, run: ./gradlew jsBrowserProductionWebpack }
- { name: Upload artifact, uses: actions/upload-pages-artifact@v3, with: { path: 'build/dist/js/productionExecutable' } }
- { name: Deploy 🚀 to GitHub Pages, id: deployment, uses: actions/deploy-pages@v4}