diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 000000000..7ce98a21e
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1 @@
+WEB-INF/
\ No newline at end of file
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
new file mode 100644
index 000000000..9e1d799b5
--- /dev/null
+++ b/.github/workflows/build.yaml
@@ -0,0 +1,70 @@
+name: Build and Deploy CircuitJS1 Docker Image
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ branches:
+ - master
+env:
+ REGISTRY: ghcr.io
+
+jobs:
+ build-and-push:
+ runs-on: ubuntu-latest
+
+ steps:
+ # Step 1: Check out the repository
+ - name: Check out code
+ uses: actions/checkout@v4
+
+ # Step 2: Set up Java for GWT build
+ - name: Set up Java
+ uses: actions/setup-java@v3
+ with:
+ distribution: "temurin"
+ java-version: "8"
+
+ # Step 3: Install GWT and dependencies
+ - name: Install GWT
+ run: |
+ sudo apt-get update && sudo apt-get install -y unzip
+ wget https://github.com/gwtproject/gwt/releases/download/2.10.0/gwt-2.10.0.zip
+ unzip gwt-2.10.0.zip -d $HOME
+ echo "GWT installed."
+
+ # Step 4: Build the CircuitJS1 application using GWT
+ - name: Compile with GWT
+ run: |
+ export GWT_HOME=$HOME/gwt-2.10.0
+ # Ensure the src/ directory is included in the classpath
+ java -cp "$GWT_HOME/gwt-dev.jar:$GWT_HOME/gwt-user.jar:./src" com.google.gwt.dev.Compiler -war war com.lushprojects.circuitjs1.circuitjs1
+
+ # Step 5: Package the GWT build artifacts (optional for debugging)
+ - name: Upload Build Artifacts
+ uses: actions/upload-artifact@v3
+ with:
+ name: circuitjs1-war
+ path: war
+
+ # Step 6: Log in to GitHub Container Registry (GHCR)
+ - name: Log in to the Container registry
+ uses: docker/login-action@v2
+ with:
+ registry: ${{ env.REGISTRY }}
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v2
+
+ # Step 7: Build and Push the Docker image
+ - name: Build and push Backend Docker image
+ uses: docker/build-push-action@v4
+ with:
+ context: .
+ file: Dockerfile
+ push: true
+ tags: ${{ env.REGISTRY }}/${{ github.repository_owner }}/circuitjs1:${{ github.ref_name }}
+ env:
+ ADC_VERSION: ${{ github.ref_name }}
diff --git a/.project b/.project
index d55af456a..a6924969b 100644
--- a/.project
+++ b/.project
@@ -42,4 +42,15 @@
Your one-stop destination for electronics calculations and simulators.
+