fix: forget build #31
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: 发布和部署 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release-and-deploy: | |
name: 发布和部署 | |
runs-on: ubuntu-latest | |
steps: | |
- name: 检出代码 | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: 设置 Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "lts/*" | |
- name: 设置 pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: latest | |
- name: 安装依赖 | |
run: pnpm install --frozen-lockfile | |
- name: 构建静态页面并部署 | |
run: pnpm run build-example-page | |
- name: 部署到 GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist-example-page | |
- name: 发布 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: pnpm semantic-release |