feat: web build for neuropilot #63
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 CI | |
| on: | |
| push: | |
| branches: [ master ] | |
| paths: | |
| - docs/** | |
| pull_request: | |
| paths: | |
| - docs/** | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| check: | |
| name: Check docs site | |
| if: ${{ github.event_name == 'pull_request' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Cache deps & types | |
| uses: actions/cache@v4 | |
| with: | |
| key: neuropilot-docs-${{ github.repository }} | |
| path: | | |
| docs/.astro | |
| docs/node_modules | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.14.0 | |
| cache: 'npm' | |
| cache-dependency-path: "./docs/package-lock.json" | |
| - name: Install deps | |
| run: | | |
| cd docs | |
| npm ci | |
| - name: Run basic checker | |
| run: cd docs && npm run check | |
| build: | |
| name: Build docs site | |
| if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Cache deps, types, output | |
| uses: actions/cache@v4 | |
| with: | |
| key: neuropilot-docs-${{ github.repository }} | |
| path: | | |
| docs/.astro | |
| docs/dist | |
| docs/node_modules | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.14.0 | |
| cache: 'npm' | |
| cache-dependency-path: "./docs/package-lock.json" | |
| - name: Setup Pages | |
| id: pages | |
| uses: actions/configure-pages@v5 | |
| - name: Install deps | |
| run: | | |
| cd docs | |
| npm ci | |
| - name: Build site | |
| working-directory: ${{ github.workspace }}/docs | |
| run: npm run build | |
| - name: Upload GitHub Pages Artifact | |
| uses: actions/upload-pages-artifact@2d163be3ddce01512f3eea7ac5b7023b5d643ce1 # Pinning to SHA because that thing hasn't updated in a year it seems | |
| with: | |
| path: docs/dist | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy -> GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |