Skip to content

Commit

Permalink
Merge branch 'main' of github.com:leaphy-robotics/leaphy-webbased-svelte
Browse files Browse the repository at this point in the history
  • Loading branch information
sverben committed May 3, 2024
2 parents cda0e73 + 6f836e2 commit 892ec4e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
node_modules/
dist/
.git/
.github/
13 changes: 13 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"

- name: Create TEST env file
if: github.ref_type == 'branch'
run: |
Expand All @@ -34,6 +39,14 @@ jobs:
VITE_SENTRY_SAMPLE_RATE="1.0"
EOF
- name: Build application
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: |
export NODE_OPTIONS="--max-old-space-size=4096"
yarn --frozen-lockfile --prefer-offline
yarn build
- name: Build and push TEST Docker image
if: github.ref_type == 'branch'
uses: docker/build-push-action@v5
Expand Down
12 changes: 1 addition & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
FROM node:20 as builder

COPY . /build
WORKDIR /build

# Prevent vite build OOM
ENV NODE_OPTIONS="--max-old-space-size=4096"

RUN yarn install --frozen-lockfile && yarn build

FROM nginx:stable

COPY --from=builder /build/dist /usr/share/nginx/html
COPY dist /usr/share/nginx/html

0 comments on commit 892ec4e

Please sign in to comment.