Merge pull request #1700 from LykosAI/main #22
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 Site | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'docs/**' | |
| pull_request: | |
| paths: | |
| - 'docs/**' | |
| workflow_dispatch: | |
| concurrency: | |
| group: docs-site-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build_and_deploy: | |
| if: github.event_name != 'pull_request' | |
| runs-on: ubuntu-latest | |
| name: Build and deploy docs site | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| # Full history so VitePress lastUpdated timestamps are accurate | |
| fetch-depth: 0 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: docs/package-lock.json | |
| - name: Install dependencies | |
| working-directory: docs | |
| run: npm ci | |
| - name: Build VitePress site | |
| working-directory: docs | |
| run: npx vitepress build . | |
| - name: Deploy to Azure Static Web Apps | |
| uses: Azure/static-web-apps-deploy@v1 | |
| with: | |
| azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_DOCS }} | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| action: upload | |
| app_location: 'docs/.vitepress/dist' | |
| skip_app_build: true | |
| build_check: | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| name: Build check (docs site) | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: docs/package-lock.json | |
| - name: Install dependencies | |
| working-directory: docs | |
| run: npm ci | |
| - name: Build VitePress site | |
| working-directory: docs | |
| run: npx vitepress build . |