Merge pull request #27 from ahmedre/gh_actions_deploy #24
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
name: Main | |
on: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx6G -XX:+HeapDumpOnOutOfMemoryError -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8 -XX:+UseParallelGC"' | |
GRADLE_FLAGS: "-q --stacktrace --no-configuration-cache" | |
JAVA_OPTS: "-Xms512m -Xmx4G" | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: zulu | |
- name: Setup Gradle | |
uses: gradle/[email protected] | |
- name: Clone Repository | |
uses: actions/checkout@v3 | |
- name: Build app and tests | |
run: ./gradlew catalog:jsBrowserDistribution | |
- name: Upload pages artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: catalog/build/dist/js/productionExecutable | |
deploy: | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |