-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c7c5a0a
commit f8cbce9
Showing
3 changed files
with
29 additions
and
5 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,34 @@ | ||
name: Docker Build Test | ||
|
||
on: [pull_request] | ||
on: | ||
pull_request: | ||
paths: | ||
- "**.js" | ||
- "**.jsx" | ||
- "**.ts" | ||
- "**.tsx" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build React App | ||
run: | | ||
npm ci --legacy-peer-deps | ||
CI=false | ||
REACT_APP_BACKEND_SERVER="http://labconnect.cs.rpi.edu:9000" | ||
REACT_APP_BACKEND_SERVER="https://api.labconnect.cs.rpi.edu" | ||
npm run build | ||
- name: "Build Docker Image" | ||
run: | | ||
docker build . | ||
docker build -t labconnect-frontend . | ||
- name: "Run Docker Container" | ||
run: | | ||
docker run -d --name labconnect-frontend-container labconnect-frontend | ||
sleep 60 | ||
docker logs labconnect-frontend-container | ||
docker stop labconnect-frontend-container | ||
docker rm labconnect-frontend-container |
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