Skip to content

refactor: update start script and remove journey page #3

refactor: update start script and remove journey page

refactor: update start script and remove journey page #3

Workflow file for this run

name: Deploy to Production
on:
push:
branches: [main]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Build project
run: bun run build
- name: Deploy to server
uses: appleboy/scp-action@master
with:
host: 69.62.124.138
username: yannvr
key: ${{ secrets.SSH_PRIVATE_KEY }}
source: "out/,public/,package.json"
target: "~/hyperdrift/yieldmax"
strip_components: 0
- name: SSH into server and restart application
uses: appleboy/ssh-action@master
with:
host: 69.62.124.138
username: yannvr
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd ~/hyperdrift/yieldmax
bun install --production
# Make sure serve is installed
bun add serve
# Restart or start the application using PM2
pm2 restart yieldmax || pm2 start "bun run start" --name "yieldmax" --env production