35 lines
739 B
YAML
35 lines
739 B
YAML
name: build dist
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-dist:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup bun.sh
|
|
uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version: latest
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
bun install
|
|
bun run build
|
|
|
|
- name: Deploy to server
|
|
uses: appleboy/scp-action@master
|
|
with:
|
|
host: ${{ secrets.HOST }}
|
|
username: ${{ secrets.USERNAME }}
|
|
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
source: "dist/*"
|
|
target: ${{ secrets.TARGET }}
|
|
strip_components: 1
|
|
overwrite: true
|