Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
VirtualHotBar authored Jul 30, 2024
1 parent a175010 commit 30e4910
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/main.yml
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

0 comments on commit 30e4910

Please sign in to comment.