UPD | docs: routers #4 #23
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 Docs | |
| on: | |
| push: | |
| branches: [development] | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| DOCS_BASE_DIR: /manapi-http | |
| outputs: | |
| docs: ${{ steps.filter.outputs.docs }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| filters: | | |
| docs: | |
| - 'docs/**' | |
| - name: Setup Node | |
| if: ${{ steps.filter.outputs.docs == 'true' }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Setup pnpm | |
| if: ${{ steps.filter.outputs.docs == 'true' }} | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| run_install: false | |
| - name: Setup Pages | |
| if: ${{ steps.filter.outputs.docs == 'true' }} | |
| uses: actions/configure-pages@v4 | |
| - name: Install dependencies | |
| if: ${{ steps.filter.outputs.docs == 'true' }} | |
| run: pnpm install | |
| working-directory: docs | |
| - name: Build with pnpm | |
| run: pnpm run build | |
| if: ${{ steps.filter.outputs.docs == 'true' }} | |
| working-directory: docs | |
| - name: Upload artifact | |
| if: ${{ steps.filter.outputs.docs == 'true' }} | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs/out | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| needs: build | |
| runs-on: ubuntu-latest | |
| name: Deploy | |
| if: ${{ needs.build.outputs.docs == 'true' }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |