Skip to content

Commit

Permalink
fix: change back to bun 1.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
ymzuiku committed Oct 13, 2023
1 parent 2643a6e commit 67dc855
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 9 deletions.
57 changes: 57 additions & 0 deletions .github/main-node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: main_deploy

on:
push:
branches: [main]

env:
CARGO_TERM_COLOR: always

jobs:
main-client:
timeout-minutes: 15
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install dependencies
run: |
bun install
bun prisma generate
- name: ESLint cache
uses: actions/cache@v3
with:
path: .eslintcache
key: |
${{ runner.os }}-eslint-${{ hashFiles('.eslintrc.cjs') }}
restore-keys: |
${{ runner.os }}-eslint-
- name: Check typescript and lint
run: |
# bun run check
# bun run lint
- name: Build
run: |
export NODE_OPTIONS=--max-old-space-size=4096
bun run es
- name: Env
run: |
chmod 777 ./
touch deploy_key
echo "${{secrets.GG_SSH_PRIVATE_KEY}}" > deploy_key
chmod 600 ./deploy_key
- name: Deploy client
run: |
rsync -av --exclude='playwright/' --exclude='test-results/' --exclude='.git/' --exclude='.github/' --exclude='.husky/' --exclude='deploy_key' --exclude='i18n.sqlite' --include='.svelte-kit/' -e 'ssh -i ./deploy_key -o StrictHostKeyChecking=no' --delete-delay ./ ${{ secrets.GG_SSH_URL }}:~/server/aisentence/
- name: Run DB Migration
run: |
ssh -i ./deploy_key -o StrictHostKeyChecking=no ${{ secrets.GG_SSH_URL }} "cd ~/server/ && ./ais-migrate.sh"
- name: Delete other
run: |
rm -r ./deploy_key
11 changes: 4 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Install dependencies
run: |
bun install
bun prisma generate
bun run prisma:init
- name: ESLint cache
uses: actions/cache@v3
with:
Expand All @@ -39,7 +39,7 @@ jobs:
- name: Build
run: |
export NODE_OPTIONS=--max-old-space-size=4096
bun run es
bun run prod
- name: Env
run: |
chmod 777 ./
Expand All @@ -48,10 +48,7 @@ jobs:
chmod 600 ./deploy_key
- name: Deploy client
run: |
rsync -av --exclude='playwright/' --exclude='test-results/' --exclude='.git/' --exclude='.github/' --exclude='.husky/' --exclude='deploy_key' --exclude='i18n.sqlite' --include='.svelte-kit/' -e 'ssh -i ./deploy_key -o StrictHostKeyChecking=no' --delete-delay ./ ${{ secrets.GG_SSH_URL }}:~/server/aisentence/
rsync -av -e 'ssh -i ./deploy_key -o StrictHostKeyChecking=no' --delete-delay ./build/* ${{ secrets.GG_SSH_URL }}:~/server/aisentence/
- name: Run DB Migration
run: |
ssh -i ./deploy_key -o StrictHostKeyChecking=no ${{ secrets.GG_SSH_URL }} "cd ~/server/ && ./ais-migrate.sh"
- name: Delete other
run: |
rm -r ./deploy_key
ssh -i ./deploy_key -o StrictHostKeyChecking=no ${{ secrets.GG_SSH_URL }} "cd ~/server/aisentence/ && ./migrate.sh"
Binary file modified bun.lockb
Binary file not shown.
4 changes: 2 additions & 2 deletions svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import adapter from '@sveltejs/adapter-node';
// import adapter from 'svelte-adapter-bun';
// import adapter from '@sveltejs/adapter-node';
import adapter from 'svelte-adapter-bun';

import { vitePreprocess } from '@sveltejs/kit/vite';

Expand Down

0 comments on commit 67dc855

Please sign in to comment.