Build the site when something is pushed to main, or on PRs (#9) #1
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: Build gwt-site-webapp | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Java | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Compile the webapp to JS | |
run: mvn --batch-mode --no-transfer-progress -e verify | |
- name: Rename generated directory | |
# Fixes issue where artifact zip contains top level directory due to wildcard expansion | |
run: mv target/gwt-site-webapp-*/ target/gwt-site-webapp | |
- name: Upload the generated JS | |
uses: actions/upload-artifact@v3 | |
with: | |
name: 'gwt-site-webapp' | |
path: target/gwt-site-webapp/ |