Update docs (#96) #90
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-build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| deployments: write | |
| jobs: | |
| docs-build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.12"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "0.4.16" | |
| # enable-cache: true | |
| - name: Set up Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| uv venv --python ${{ matrix.python-version }} | |
| uv pip install . | |
| - name: Install optional dependencies | |
| run: | | |
| uv pip install pytest | |
| uv pip install -r requirements_dev.txt | |
| - name: Test import | |
| run: | | |
| uv run python -c "import vgrid; print('vgrid import successful')" | |
| # - name: Running pytest | |
| # run: | | |
| # uv run pytest . --verbose | |
| - name: Install mkdocs | |
| run: | | |
| uv pip install -r requirements_docs.txt | |
| uv run mkdocs build | |
| - name: Deploy to Cloudflare Pages | |
| uses: cloudflare/pages-action@v1 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }} | |
| directory: ./site | |
| gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Cleanup | |
| if: always() | |
| run: | | |
| echo "Cleaning up resources." |