Skip to content

Commit

Permalink
Proposed web-build pipeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Jordan committed Oct 25, 2023
1 parent 215eac5 commit c47e0ef
Showing 1 changed file with 26 additions and 15 deletions.
41 changes: 26 additions & 15 deletions .github/workflows/web_build.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,43 @@
name: Build
name: WebDeployment

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

env:
CI:
CI: true

jobs:
build:
name: Build
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
- name: Checkout Code
uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- uses: gradle/wrapper-validation-action@v1
- uses: gradle/gradle-build-action@v2
- name: Build

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1

- name: Build with Gradle
run: ./gradlew :webApp:jsBrowserProductionWebpack
- name: Upload Build Artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v2
with:
name: my-app-artifact
path: desktopApp/build/libs/my-app.jar

- name: Move Output to Directory
run: |
mkdir distribution
mv -r webApp/build/distributions distribution/
# Commit and push the directory to a specified branch (e.g., "output-branch")
- name: Commit and Push to Branch
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git add distribution/
git commit -m "Add output from build"
git push origin HEAD:deploy-branch

0 comments on commit c47e0ef

Please sign in to comment.