Skip to content

Commit

Permalink
Fix webapp build #288
Browse files Browse the repository at this point in the history
  • Loading branch information
tung2744 authored Apr 24, 2024
2 parents 1004521 + 62b8565 commit 8dbc337
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
**/.git
**/.DS_Store
**/node_modules
**/.parcel-cache
website
example/capacitor
example/reactnative
example/reactweb/dist
packages/authgear-capacitor
packages/authgear-react-native
14 changes: 14 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ jobs:
- run: npm run bundle
if: ${{ !cancelled() }}

webapp-image:
runs-on: ubuntu-22.04
needs: test
steps:
- uses: actions/checkout@v3
- run: make build-image
- uses: docker/login-action@v2
if: ${{ github.repository == 'authgear/authgear-sdk-js' && github.event_name == 'push' }}
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
- run: make push-image

# react_native_ios cannot be built on simulator due to WeChat SDK

test_react_native_android:
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,12 @@ docs:
deploy-docs: docs
./scripts/deploy_docs.sh

# NOTE(louis): For some unknown reason, if platfrom is set to linux/x86_64,
# The npm run build will get stuck forever on my Apple Silicon MacBook.
# So we have to build it on CI.
.PHONY: build-image
build-image:
docker build --platform linux/x86-64 --tag $(IMAGE) --file ./example/reactweb/Dockerfile .
docker build --tag $(IMAGE) --file ./example/reactweb/Dockerfile .

.PHONY: push-image
push-image:
Expand Down
2 changes: 1 addition & 1 deletion all-in-one.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ spec:
spec:
containers:
- name: authgear-demo-webapp
image: quay.io/theauthgear/authgear-demo-webapp:git-72e7d2e68a5f
image: quay.io/theauthgear/authgear-demo-webapp:git-96805d6de036
ports:
- name: http
containerPort: 80
Expand Down

0 comments on commit 8dbc337

Please sign in to comment.