feat(deploy): add GitHub Actions workflow for deployment to server

This commit is contained in:
M1ngdaXie
2026-03-26 22:32:37 -07:00
parent c603dc6745
commit e5251cd0c7

View File

@@ -0,0 +1,30 @@
name: Deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Deploy to /var/www
run: |
rm -rf /var/www/os.m1ngdaxie.com/*
cp -r dist/* /var/www/os.m1ngdaxie.com/