Enhance: インタラクティブなチェックリストとクイズ機能を実装 #15
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: Main Workflow | |
| # すべてのワークフローを統合 | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| # 同時実行を完全に防止 | |
| concurrency: | |
| group: "master-workflow-${{ github.ref }}" | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| security-events: write | |
| jobs: | |
| security-scan: | |
| name: Security Scan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Needed for Gitleaks to scan full history | |
| - name: Run gitleaks | |
| uses: zricethezav/gitleaks-action@v2 | |
| continue-on-error: true # Allow workflow to continue even if leaks are found | |
| with: | |
| config-path: "" # Use default config | |
| report-format: sarif | |
| report-path: gitleaks-report.sarif | |
| - name: Upload Gitleaks report to GitHub | |
| if: ${{ always() && hashFiles('gitleaks-report.sarif') != '' }} | |
| uses: github/codeql-action/upload-sarif@v3 | |
| with: | |
| sarif_file: gitleaks-report.sarif | |
| - name: Display result message | |
| run: echo "Security scan completed successfully" | |
| build-docs: | |
| name: Build & Deploy Docs | |
| needs: [security-scan] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install mkdocs-mermaid2-plugin | |
| - name: Build with MkDocs | |
| run: | | |
| mkdocs build --verbose || mkdocs build | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| if: github.event_name != 'pull_request' | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./site | |
| destination: ./ # Deploy to the root of gh-pages branch | |
| keep_files: true # Keep existing files in the gh-pages branch |