feat(json格式化):提升json格式化的兼容性 #40
This file contains hidden or 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: Deploy to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - main # 当推送到 main 分支时触发 | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout 代码 | |
| uses: actions/checkout@v4 | |
| - name: 设置 Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| - name: 安装依赖 | |
| run: npm ci | |
| - name: 构建项目 | |
| run: npm run build | |
| env: | |
| API_KEY: ${{ secrets.API_KEY }} | |
| - name: 部署到 GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./dist | |
| publish_branch: gh-pages |