添加 CI 自动部署 workflow + CMS IP 配置
All checks were successful
Build and Deploy / build-deploy (push) Successful in 46s
All checks were successful
Build and Deploy / build-deploy (push) Successful in 46s
This commit is contained in:
25
.gitea/workflows/deploy.yml
Normal file
25
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
name: Build and Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 检出代码
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 安装依赖
|
||||
run: npm ci
|
||||
|
||||
- name: 构建站点
|
||||
run: npm run build
|
||||
|
||||
- name: 发布到 Nginx 目录
|
||||
run: |
|
||||
mkdir -p /var/www/shizhui
|
||||
rsync -a --delete dist/ /var/www/shizhui/
|
||||
echo "已发布到 /var/www/shizhui"
|
||||
Reference in New Issue
Block a user