add new deployment #18
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 Web App | |
on: | |
push: | |
branches: | |
- master # Or the name of your default branch | |
paths-ignore: | |
- 'docs/**' | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- name: Set up JDK 19 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'zulu' | |
java-version: 19 | |
- name: Build Project | |
run: ./gradlew wasmJsBrowserProductionWebpack | |
- name: Build Project | |
run: ./gradlew wasmJsBrowserProductionExecutableDistributeResources | |
- name: Copy Production Executable to Docs | |
run: | | |
mkdir -p ./docs | |
cp -R ./webApp/build/dist/wasmJs/productionExecutable/* ./docs/ | |
- name: Commit results | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git commit -m "Add changes" -a | |
- name: Push changes onto new branch | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
branch: create-pr | |
force: true | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
branch: deploy-web-app | |
base: master | |
title: 'New changes from build' | |
body: 'This PR was auto-generated by the Build and Deploy workflow.' |