Skip to content

Commit

Permalink
feat: 修改yml
Browse files Browse the repository at this point in the history
  • Loading branch information
laoriy committed Dec 23, 2023
1 parent ea38550 commit 505fe19
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Publish And Deploy Demo
on:
push:
branches:
- 'nuxt-realworld'
- nuxt-realworld

jobs:
build-and-deploy:
Expand All @@ -11,29 +11,32 @@ jobs:

# 下载源码
- name: Checkout
uses: actions/checkout@main
uses: actions/checkout@master

- name: Change Dir
run: cd 3.vue/5.server-render/nuxt-realworld

# 打包构建
- name: SetUp nodejs
uses: actions/setup-node@main
uses: actions/setup-node@master


# 安装pnpm
- name: Install pnpm
run: npm install -g pnpm
# 安装依赖
- name: Build Dep
- run: pnpm install
- run: pnpm run build
- run: tar -zcvf release.tgz .output ecosystem.config.js
- name: Install Dep
run: pnpm install

- name: Build
run: pnpm run build
- name: Compress
run: tar -zcvf release.tgz .output ecosystem.config.js

# 发布 Release
- name: Create Release
id: create_release
uses: actions/create-release@main
uses: actions/create-release@master
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
Expand All @@ -45,7 +48,7 @@ jobs:
# 上传构建结果到 Release
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@main
uses: actions/upload-release-asset@master
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
Expand All @@ -56,7 +59,7 @@ jobs:

# 部署到服务器
- name: Deploy
uses: appleboy/ssh-action@main
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
Expand Down

0 comments on commit 505fe19

Please sign in to comment.