Skip to content

Commit

Permalink
build(构建): 自动化
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangkc committed Jul 17, 2024
1 parent 52f7caa commit 7fbfdfd
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,21 @@ on:
- master # 或者是你的默认分支名称

jobs:
deploy:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Build and Deploy
uses: JamesIves/[email protected]
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: '20' # 或者你使用的 Node.js 版本
- name: Build project
run: |
npm install
npm run build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
branch: gh-pages # The branch the action should deploy to.
folder: public # The folder the action should deploy from.
# github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist

0 comments on commit 7fbfdfd

Please sign in to comment.