From 9cfd8b689ebf801f322e7e4729a5bed0c60e2a67 Mon Sep 17 00:00:00 2001 From: kjch <1834423612@qq.com> Date: Mon, 3 Jun 2024 16:35:20 -0400 Subject: [PATCH] Create deploy.yml --- .github/workflows/deploy.yml | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..46314ead --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,37 @@ +name: Deploy to HTML Pages + +on: + push: + branches: + - vue + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: 20.9.0 + + - name: Install pnpm + run: npm install -g pnpm@9.1.4 + + - name: Install dependencies + run: pnpm install + + - name: Build project + run: pnpm build + + - name: Deploy to GitHub Pages + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git add dist -f + git commit -m "Deploy to HTML Pages" + git push origin `git subtree split --prefix dist vue`:webpage --force +