feat(doc): add readme.md #62
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
name: NodeJS with Webpack | |
on: | |
push: | |
branches: ['main'] | |
pull_request: | |
branches: ['main'] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8.3.1 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: Build | |
run: | | |
pnpm install | |
pnpm build | |
- name: Depoly | |
uses: peaceiris/actions-gh-pages@v3 # 一个自动发布github pages的action | |
with: | |
publish_branch: gh-pages | |
publish_dir: ./dist | |
github_token: ${{ secrets.GAIUS_TOKEN }} | |
user_name: Gaius-98 | |
user_email: 2388838628@qq.com | |
allow_empty_commit: true # 允许空提交 | |
# 获取代码提交时的commit message,作为发布gh-pages分支的信息 | |
commit_message: ${{ github.event.head_commit.message }} | |
full_commit_message: ${{ github.event.head_commit.message }} |