Skip to content

Commit

Permalink
feat: add GitHub Actions workflow for build and deployment; remove De…
Browse files Browse the repository at this point in the history
…pendabot configuration
  • Loading branch information
maxchang3 committed Feb 9, 2025
1 parent c04a2ba commit 1e7b91d
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 8 deletions.
7 changes: 0 additions & 7 deletions .github/dependabot.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
"hexo-server": "^3.0.0",
"hexo-theme-landscape": "^1.0.0"
}
}
}

0 comments on commit 1e7b91d

Please sign in to comment.