-
Notifications
You must be signed in to change notification settings - Fork 17
35 lines (30 loc) · 1.09 KB
/
deploy-js.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# 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 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}