添加发布工作流 #1
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'] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Install pnpm | |
run: npm install -g pnpm | |
- name: Build | |
run: | | |
pnpm install | |
pnpm run build | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
personal_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist |