Merge pull request #6 from volcengine/refactor/move-clients-to-sdk-pa… #7
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
| # 构建 VitePress 站点并将其部署到 GitHub Pages 的示例工作流程 | |
| # | |
| name: Deploy VitePress site to Pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - feat/docs | |
| paths: | |
| - 'docs/**' | |
| - '.github/workflows/deploy-docs.yml' | |
| # 允许你从 Actions 选项卡手动运行此工作流程 | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22' | |
| - name: Install dependencies | |
| run: | | |
| cd docs | |
| echo "Check current directory" | |
| pwd | |
| npm ci | |
| - name: Build with VitePress | |
| run: | | |
| cd docs | |
| echo "Check current directory" | |
| pwd | |
| npm run docs:build | |
| - name: Deploy to feat/deploy | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: docs/.vitepress/dist | |
| publish_branch: feat/deploy | |
| user_name: 'github-actions[bot]' | |
| user_email: 'github-actions[bot]@users.noreply.github.com' | |
| commit_message: 'Deploy docs to feat/deploy' |