feat(ci): 週次 schedule と workflow_dispatch を追加し外界の変化を検知する (v1.8.169) #447
Workflow file for this run
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: Docs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| name: Build Docs | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| # 手動メンテのサイドバーから漏れた Diátaxis ページ(孤立ページ)を検出する。 | |
| - name: Check sidebar coverage | |
| run: python3 scripts/check_docs_nav.py | |
| # dead-link 検出は config.mts で ON。壊れた内部リンクでここが落ちる。 | |
| - name: Build VitePress site | |
| run: npm run docs:build | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: .vitepress/dist | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| needs: build | |
| # デプロイは main への push のみ。PR はビルド検証(リンク・ナビ)までで止める。 | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |