This commit is contained in:
parent
6773f86bc5
commit
570a36affe
20
.gitea/workflows/deploy.yaml
Normal file
20
.gitea/workflows/deploy.yaml
Normal file
@ -0,0 +1,20 @@
|
||||
name: Deploy to Server
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main # 当推送到 main 分支时触发工作流
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: self-hosted # 使用自托管的 Gitea Runner
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2 # 从 Gitea 仓库中拉取代码
|
||||
|
||||
- name: Set up Docker
|
||||
run: |
|
||||
docker-compose down # 停止现有服务
|
||||
docker-compose pull # 拉取最新镜像
|
||||
docker-compose up -d # 启动服务
|
Loading…
Reference in New Issue
Block a user