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-
|
${{ runner.os }}-pnpm-
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install
|
run: pnpm install
|
||||||
# Nuxt 构建缓存,加快二次构建
|
|
||||||
- name: Cache Nuxt build
|
- name: Cache Nuxt build
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
@ -36,7 +35,8 @@ jobs:
|
|||||||
${{ runner.os }}-nuxt-
|
${{ runner.os }}-nuxt-
|
||||||
- name: Build project
|
- name: Build project
|
||||||
run: pnpm run build
|
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
|
uses: easingthemes/ssh-deploy@main
|
||||||
with:
|
with:
|
||||||
ARGS: "-rlgoDzvc -i --delete"
|
ARGS: "-rlgoDzvc -i --delete"
|
||||||
|
|||||||
Reference in New Issue
Block a user