diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml new file mode 100644 index 0000000..f89e732 --- /dev/null +++ b/.github/workflows/deploy-gh-pages.yml @@ -0,0 +1,37 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: + - master # Adjust this if your main branch has a different name + workflow_dispatch: # Allows manual triggering + +permissions: + contents: write + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Set up JDK + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '17' + + - name: Grant execute permission for Gradle + run: chmod +x gradlew + + - name: Build JavaScript Version + run: ./gradlew browserReleaseEsbuild + + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@v4 + with: + branch: gh-pages # Target branch + folder: build/www # Directory to deploy + clean: true # Removes old files before deployment