From 0c934f8df2685c3e3b2b2a557233962b169453ed Mon Sep 17 00:00:00 2001 From: yutent Date: Sun, 19 Feb 2023 14:52:56 +0800 Subject: [PATCH 1/2] Create main.yaml --- .github/workflows/main.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/main.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..9cdcf7b --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,23 @@ + +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: 安装依赖并编译 + run: | + npm i + npm run build From d1e3fe8c2c76135764c0c6e7db60c7d8312b1a79 Mon Sep 17 00:00:00 2001 From: yutent Date: Sun, 19 Feb 2023 14:59:24 +0800 Subject: [PATCH 2/2] Update main.yaml --- .github/workflows/main.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 9cdcf7b..d274428 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -21,3 +21,12 @@ jobs: run: | 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