From c93d7d206baef9e006f1011bae64705d630844c5 Mon Sep 17 00:00:00 2001 From: imsyy Date: Sat, 2 Dec 2023 09:11:18 +0800 Subject: [PATCH] feat: add Actions --- .github/workflows/build.yml | 38 +++++++++++++++++++++++++++++++++++++ src/components/Music.vue | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..93933cd --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,38 @@ +# Dev 分支推送部署预览 +## 仅部署 Win 端 +name: Build Dev + +on: + push: + branches: + - dev + - master + +jobs: + release: + name: Build Website + runs-on: windows-latest + + steps: + # 检出 Git 仓库 + - name: Check out git repository + uses: actions/checkout@v4.1.1 + # 安装 Node.js + - name: Install Node.js + uses: actions/setup-node@v4.0.0 + with: + node-version: "18.x" + # 安装项目依赖 + - name: Install Dependencies + run: npm install + # 构建程序 + - name: Build Website + run: npm run build + env: + GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} + # 上传构建产物 + - name: Upload artifacts + uses: actions/upload-artifact@v3.1.3 + with: + name: Home + path: dist diff --git a/src/components/Music.vue b/src/components/Music.vue index 5239a46..37cccb2 100644 --- a/src/components/Music.vue +++ b/src/components/Music.vue @@ -54,12 +54,12 @@ @click="musicListShow = false" />