fix: 统计资源无法加载 #189
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: Doc Page Publish | |
on: | |
push: | |
branches: [main-docs] | |
pull_request: | |
branches: [main-docs] | |
jobs: | |
publish: | |
name: Build and Publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
registry-url: https://registry.npmjs.org/ | |
- name: Install Dependencies | |
run: yarn install | |
- name: Generate Static Files | |
run: yarn build | |
- name: Publish to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: docs | |
folder: out | |
# 直接覆盖到根目录,不再使用docs作为发布目录了 | |
# target-folder: docs |