-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci: add build github action * ci: add sentry release/sourcemap integration fix: OOM when building app
- Loading branch information
1 parent
0627d18
commit c24532b
Showing
6 changed files
with
643 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules/ | ||
dist/ | ||
.git/ | ||
.env* | ||
.github/ |
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Deploy | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
branches: | ||
- main | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
push: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Docker Login | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push TEST Docker image | ||
if: github.ref_type == 'branch' | ||
uses: docker/build-push-action@v5 | ||
with: | ||
file: Dockerfile | ||
context: . | ||
push: true | ||
tags: ghcr.io/leaphy-robotics/leaphy-webbased-svelte/leaphy-webbased-svelte:test | ||
|
||
- name: Redeploy TEST | ||
if: github.ref_type == 'branch' | ||
run: | | ||
curl https://admin.leaphyeasybloqs.com/hooks/update-docker-image?stack=leaphy-webbased-svelte -H "X-Token: ${{ secrets.WEBHOOK_TOKEN }}" | ||
- name: Clean up old images | ||
uses: actions/delete-package-versions@v5 | ||
with: | ||
package-name: "leaphy-webbased/leaphy-webbased-svelte" | ||
package-type: "container" | ||
min-versions-to-keep: 5 | ||
delete-only-untagged-versions: "true" |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
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 |
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
Oops, something went wrong.