docs: 使い方ガイドをGitHub Pages中心に再構成 #26
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: Build and Deploy GitHub Pages | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - 'examples/**/*.qmd' | |
| - 'index.qmd' | |
| - '_quarto.yml' | |
| - 'templates/styles/**' | |
| - 'sources/references/**' | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| build-and-deploy: | |
| name: Build Examples and Deploy to GitHub Pages | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Quarto | |
| uses: quarto-dev/quarto-actions/setup@v2 | |
| - name: Verify Quarto installation | |
| run: | | |
| quarto --version | |
| quarto check | |
| - name: Build website | |
| run: | | |
| echo "📚 Building examples and website..." | |
| quarto render | |
| echo "✅ Build complete" | |
| - name: List output | |
| run: | | |
| echo "Generated files:" | |
| ls -la output/ | |
| find output/ -type f | head -20 | |
| - name: Setup Pages | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: output/ | |
| - name: Deploy to GitHub Pages | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |
| - name: Generate deployment summary | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| run: | | |
| echo "## 🚀 Deployment Results" >> $GITHUB_STEP_SUMMARY | |
| echo "- Status: ✅ Success" >> $GITHUB_STEP_SUMMARY | |
| echo "- URL: ${{ steps.deployment.outputs.page_url }}" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### 📦 Content" >> $GITHUB_STEP_SUMMARY | |
| echo "- Top page: index.html" >> $GITHUB_STEP_SUMMARY | |
| echo "- Examples: examples/" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### 📝 Note" >> $GITHUB_STEP_SUMMARY | |
| echo "This is a template repository. Users fork and create their reports in reports/ directory." >> $GITHUB_STEP_SUMMARY |