ci: 为项目添加CI/CD功能 #30
@ -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