-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a175010
commit 30e4910
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Actions CI - GitHub Actions Build and Deploy | ||
on: | ||
push: | ||
branches: [ main ] | ||
# 执行的一项或多项任务 | ||
jobs: | ||
build-and-deploy: | ||
# 运行在虚拟机环境ubuntu-latest | ||
# https://docs.github.com/zh/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 获取源码 🛎️ | ||
uses: actions/checkout@v3 | ||
- name: Node环境版本 🗜️ | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: 安装 Pnpm 🧬 | ||
uses: pnpm/action-setup@v2 | ||
id: pnpm-install | ||
with: | ||
version: 7 | ||
run_install: true | ||
- name: 安装依赖 ⚙️ | ||
run: pnpm install | ||
- name: 打包 🏗️ | ||
run: | | ||
npm run build | ||
touch out/.nojekyll | ||
- name: 部署 🚀 | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
branch: dist | ||
folder: dist | ||
clean: true |