docs: fix demo data #13
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: CI Build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| release: | |
| types: | |
| - published | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: "22" | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.11" | |
| - name: Set up uv package manager | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Install dependencies | |
| run: npm install | |
| - uses: actions/cache@v4 | |
| id: cache-demo-data | |
| with: | |
| path: packages/docs/demo-data | |
| key: ${{ runner.os }}-${{ hashFiles('packages/docs/generate_demo_data.py') }} | |
| - name: Generate demo data | |
| if: steps.cache-demo-data.outputs.cache-hit != 'true' | |
| run: cd packages/docs && uv run generate_demo_data.py | |
| - name: Run custom build script | |
| run: ./scripts/build.sh | |
| - name: Upload python package artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: python-dist | |
| path: packages/backend/dist/ | |
| - name: Upload docs artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: packages/docs/.vitepress/dist/ | |
| publish-pypi: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'release' | |
| needs: | |
| - build | |
| permissions: | |
| id-token: write | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/embedding-atlas | |
| steps: | |
| - name: Retrieve release distributions | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: python-dist | |
| path: dist/ | |
| - name: Publish release distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: dist/ | |
| publish-pages: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'release' | |
| needs: | |
| - build | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |