38 lines
646 B
YAML
38 lines
646 B
YAML
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ "master" ]
|
|
pull_request:
|
|
branches: [ "master" ]
|
|
|
|
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18.10.0
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: 安装依赖并编译
|
|
run: |
|
|
pwd
|
|
ls -lsh
|
|
npm i
|
|
npm run build
|
|
|
|
- name: 上传dist目录
|
|
uses: actions/upload-pages-artifact@v1
|
|
with:
|
|
path: './dist'
|
|
|
|
- name: 部署github pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v1
|