From 87b4a22cafa66619021d116e8c62c4131828cd21 Mon Sep 17 00:00:00 2001 From: Chen Fengyuan Date: Sun, 5 Jan 2025 22:35:42 +0800 Subject: [PATCH] ci: update v1 actions --- .github/workflows/ci.yml | 8 +++++--- .github/workflows/deploy.yml | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a11eca2e..b4263a37 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,11 @@ name: CI on: push: - branches: [main] + branches: + - v1 pull_request: - branches: [main] + branches: + - v1 jobs: build: @@ -14,7 +16,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 22 - run: npm install - run: npm run lint - run: npm run build diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 38357dd0..5bc5362e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,10 +17,12 @@ jobs: with: ref: gh-pages clean: false - - run: cp -rf .temp/* . + - run: rm -rf v1 + - run: mkdir -p v1 + - run: cp -rf .temp/* v1 - run: rm -r .temp - run: git config user.name "${{ github.actor }}" - run: git config user.email "${{ github.actor }}@users.noreply.github.com" - - run: git add --all + - run: git add v1 - run: git commit --message "${{ github.ref_name }}" - run: git push