ci: 调整workflow
All checks were successful
deploy to server / build-and-deploy (push) Successful in 8m8s
All checks were successful
deploy to server / build-and-deploy (push) Successful in 8m8s
- 只有master分支更新时执行项目部署操作
This commit is contained in:
@ -26,7 +26,6 @@ jobs:
|
||||
${{ runner.os }}-pnpm-
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
# Nuxt 构建缓存,加快二次构建
|
||||
- name: Cache Nuxt build
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@ -36,7 +35,8 @@ jobs:
|
||||
${{ runner.os }}-nuxt-
|
||||
- name: Build project
|
||||
run: pnpm run build
|
||||
- name: Rsync build artifact to server
|
||||
- name: Deploy to server
|
||||
if: github.ref == 'refs/heads/master'
|
||||
uses: easingthemes/ssh-deploy@main
|
||||
with:
|
||||
ARGS: "-rlgoDzvc -i --delete"
|
||||
|
||||
Reference in New Issue
Block a user