-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
zhangkc
committed
Jul 17, 2024
1 parent
52f7caa
commit 7fbfdfd
Showing
1 changed file
with
15 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |