Skip to content

Refactors CSS from inline to styled components #954

Refactors CSS from inline to styled components

Refactors CSS from inline to styled components #954

Workflow file for this run

name: Build, Test and Deploy
on:
push:
branches:
- alpha
- main
jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- run: bun install
- run: rm -rf public/assets
- run: bun i
- run: bun run build
- run: bun test
deploy-main:
needs: build-test
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Deploy to tw.nolotus.com
uses: appleboy/ssh-action@master
with:
host: tw.nolotus.com
username: nolotus
key: ${{ secrets.SERVER_TW_KEY }}
script: |
cd bun-nolo
git fetch --all
git reset --hard origin/main
/home/nolotus/.bun/bin/bun install
rm -rf public/assets
/home/nolotus/.bun/bin/bun run ./scripts/esBuild.js
# 使用一个命令删除所有旧的 nolo 进程
sudo pm2 delete nolo || true
# 启动新的进程
sudo pm2 start packages/server/entry.ts --interpreter /home/nolotus/.bun/bin/bun --name nolo
# 保存 PM2 进程列表
sudo pm2 save
echo "部署完成"
deploy-alpha-us:
needs: build-test
if: github.ref == 'refs/heads/alpha'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Deploy to us.cybot.run
uses: appleboy/ssh-action@master
with:
host: us.cybot.run
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SERVER_SSH_KEY }}
script: |
cd /root/bun-nolo
git fetch --all
git reset --hard origin/alpha
/root/.bun/bin/bun install
rm -rf public/assets
/root/.bun/bin/bun run ./scripts/esBuild.js
# 使用一个命令删除所有旧的 nolo 进程
/root/.bun/bin/pm2 delete all
# 启动新的进程
/root/.bun/bin/pm2 start packages/server/entry.ts --interpreter /root/.bun/bin/bun --name nolo
# 保存 PM2 进程列表
/root/.bun/bin/pm2 save
echo "部署完成"