docs(examples): fix incorrect CLI usage instructions in demo_mlp.sw #34
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: Deploy Documentation | |
| on: | |
| push: | |
| branches: ["main", "master"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install mdBook | |
| uses: peaceiris/actions-mdbook@v2 | |
| with: | |
| mdbook-version: 'latest' | |
| - name: Build mdBook | |
| run: | | |
| cd docs | |
| mdbook build | |
| cd .. | |
| - name: Build API Docs | |
| run: cargo doc --workspace --no-deps | |
| - name: Prepare Site | |
| run: | | |
| mkdir -p public/book | |
| cp -r docs/book/* public/book/ | |
| mkdir -p public/api | |
| cp -r target/doc/* public/api/ | |
| # Create index landing page | |
| cat > public/index.html <<EOF | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Shrew Documentation</title> | |
| <style> | |
| body { font-family: sans-serif; max-width: 800px; margin: 40px auto; line-height: 1.6; } | |
| .container { text-align: center; margin-top: 50px; } | |
| a { display: inline-block; margin: 10px; padding: 20px; background: #f0f0f0; text-decoration: none; color: #333; border-radius: 5px; border: 1px solid #ddd; } | |
| a:hover { background: #e0e0e0; } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <h1>Shrew Documentation</h1> | |
| <a href="book/index.html"><strong>The Shrew Book</strong><br>User Guide & Architecture</a> | |
| <a href="api/shrew/index.html"><strong>Rust API Reference</strong><br>Crate Documentation</a> | |
| </div> | |
| </body> | |
| </html> | |
| EOF | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./public | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |