From 1e7b91dbc1ead97f912a9ebc2463d7d01306a35f Mon Sep 17 00:00:00 2001 From: MaxChang3 Date: Sun, 9 Feb 2025 17:39:38 +0800 Subject: [PATCH] feat: add GitHub Actions workflow for build and deployment; remove Dependabot configuration --- .github/dependabot.yml | 7 ------ .github/workflows/build.yml | 47 +++++++++++++++++++++++++++++++++++++ package.json | 2 +- 3 files changed, 48 insertions(+), 8 deletions(-) delete mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/build.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 93385d9..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,7 +0,0 @@ -version: 2 -updates: -- package-ecosystem: npm - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 20 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..0febfae --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,47 @@ +name: "Build and Deploy" + +on: + workflow_dispatch: + push: + branches: + - site + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 10 + run_install: true + + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: pnpm + + - name: Install dependencies + run: pnpm install + + - name: Build the project + run: pnpm build + + - name: Deploy + uses: JamesIves/github-pages-deploy-action@v4.5.0 + with: + branch: gh-pages + folder: dist + clean: true + clean-exclude: | + .nojekyll diff --git a/package.json b/package.json index 07a8cd2..6cdeb85 100644 --- a/package.json +++ b/package.json @@ -24,4 +24,4 @@ "hexo-server": "^3.0.0", "hexo-theme-landscape": "^1.0.0" } -} \ No newline at end of file +}