From 3d1ff732282b8b36f48ff3374c0eb6674db5e7f0 Mon Sep 17 00:00:00 2001 From: xlsea Date: Fri, 30 May 2025 18:08:27 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=96=B0=E5=A2=9E=E9=83=A8=E7=BD=B2?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitee/workflows/linter.yml | 30 -------------------------- .gitee/workflows/release.yml | 25 ---------------------- .github/workflows/deploy.yml | 41 ++++++++++++++++++++++++++++++++++++ .github/workflows/linter.yml | 2 +- 4 files changed, 42 insertions(+), 56 deletions(-) delete mode 100644 .gitee/workflows/linter.yml delete mode 100644 .gitee/workflows/release.yml create mode 100644 .github/workflows/deploy.yml diff --git a/.gitee/workflows/linter.yml b/.gitee/workflows/linter.yml deleted file mode 100644 index 450ec865..00000000 --- a/.gitee/workflows/linter.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- -name: Lint Code - -permissions: - contents: write - -on: - pull_request: - branches: [main] - -jobs: - lint: - name: Lint All Code - runs-on: ubuntu-latest - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Lint Code Base - uses: github/super-linter@v4 - env: - VALIDATE_ALL_CODEBASE: false - DEFAULT_BRANCH: main - # To change branch master or main - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - FILTER_REGEX_EXCLUDE: (docs|.github) - VALIDATE_MARKDOWN: false diff --git a/.gitee/workflows/release.yml b/.gitee/workflows/release.yml deleted file mode 100644 index 0bf7c92d..00000000 --- a/.gitee/workflows/release.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Release - -permissions: - contents: write - -on: - push: - tags: - - "v*" - -jobs: - release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - uses: actions/setup-node@v3 - with: - node-version: 18.x - - - run: npx githublogen - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..6077ef89 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,41 @@ +name: Build and Deploy + +on: + push: + branches: [ "master" ] + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 10.x + run_install: false + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 20.x + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install + + - name: Build project + run: pnpm build + + - name: Upload via SCP + uses: appleboy/scp-action@v0.1.4 + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USERNAME }} + key: ${{ secrets.SSH_PRIVATE_KEY }} + port: ${{ secrets.SSH_PORT }} + source: "dist/*" + target: ${{ secrets.TARGET_PATH }} diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 450ec865..3ee2a874 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -6,7 +6,7 @@ permissions: on: pull_request: - branches: [main] + branches: [master] jobs: lint: