Merge pull request #1 from LayerDynamics/develop #2
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: Documentation | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "src/**" | |
| - "docs/**" | |
| - "scripts/**" | |
| - "README.md" | |
| - ".github/workflows/docs.yml" | |
| workflow_dispatch: | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Deno | |
| uses: denoland/setup-deno@v1 | |
| with: | |
| deno-version: v1.x | |
| - name: Cache Dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.deno | |
| ~/.cache/deno | |
| key: ${{ runner.os }}-deno-${{ hashFiles('deno.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-deno- | |
| - name: Install MkDocs | |
| run: | | |
| pip install mkdocs-material | |
| pip install pymdown-extensions | |
| - name: Generate API Documentation | |
| run: | | |
| deno run --allow-read --allow-write --allow-run --allow-env scripts/generate_docs.ts | |
| - name: Build MkDocs Site | |
| run: | | |
| mkdocs build -f docs/site/mkdocs.yml -d site_build | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./site_build | |
| publish_branch: gh-pages | |
| full_commit_message: "docs: update documentation site (auto)" |