feat: demo-1 #656
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 | |
| on: | |
| # workflow_dispatch: {} | |
| push: | |
| branches: | |
| - master | |
| # paths: | |
| # - 'docs/**' # 指定 docs 目录下的文件变化时才触发 | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| # pages: write | |
| # id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| # - name: 安装pnpm | |
| # uses: pnpm/action-setup@v2 | |
| # with: | |
| # version: 8 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| cache: npm # pnpm | |
| - name: 安装 node 依赖 | |
| run: npm i # pnpm i --frozen-lockfile | |
| - name: Build | |
| run: npm run docs-build # pnpm docs-build | |
| - name: Deploy to GitHub Pages 🚀 | |
| uses: JamesIves/github-pages-deploy-action@v4.4.2 | |
| with: | |
| folder: blog/.vitepress/dist # The folder the action should deploy. | |
| # branch: master | |
| # token: ${{ secrets.DEPLOY }} | |
| # - uses: actions/configure-pages@master | |
| # - uses: actions/upload-pages-artifact@v1 | |
| # with: | |
| # path: .vitepress/dist | |
| # - name: Deploy | |
| # id: deployment | |
| # uses: actions/deploy-pages@v1 |