From 9f832290de80c3a8e31f1b14e75e5f5bef8be711 Mon Sep 17 00:00:00 2001 From: yutent Date: Tue, 18 Jul 2023 18:27:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=8A=A8=E9=83=A8?= =?UTF-8?q?=E7=BD=B2=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yaml | 45 +++++++++++++++++++++++++++++++++++++ 1 file changed, 45 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..cdc63be --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,45 @@ + +name: CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/setup-node@v3 + with: + node-version: 18.10.0 + + - name: 拉取代码 + uses: actions/checkout@v3 + + - name: 安装依赖并编译 + run: | + npm i + npm run build + + - name: 设置github pages + uses: actions/configure-pages@v3 + + - name: 上传dist目录 + uses: actions/upload-pages-artifact@v1 + with: + path: './dist' + + - name: 部署github pages + id: deployment + uses: actions/deploy-pages@v1 \ No newline at end of file