feat: ❄️ add Nix flake and update dependencies #42
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
| # Simple workflow for deploying static content to GitHub Pages | |
| name: Documentation | |
| # specify which events will trigger this workflow | |
| on: | |
| # run on all pushed to main | |
| push: | |
| branches: | |
| - main | |
| # PRs trigger for the "opened", "reopened", "synchronize" events (default) and | |
| # "ready_for_review" | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize # when new commits are pushed to the PR | |
| - ready_for_review # when the PR is un-drafted | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Allow one concurrent deployment | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| COLUMNS: 120 | |
| FORCE_COLOR: 3 | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| python-version: "3.11" | |
| - name: Install package | |
| run: | | |
| uv sync --group docs | |
| - name: Python environment information | |
| run: | | |
| uv tree | |
| - name: Get src_method version | |
| run: | | |
| uv run python -c "import src_method; print(src_method.__version__)" | |
| - name: Build docs | |
| run: | | |
| uv run mkdocs build | |
| - name: Setup Pages | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| uses: actions/configure-pages@v6 | |
| - name: Upload artifact | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| uses: actions/upload-pages-artifact@v5 | |
| with: | |
| # Upload entire repository | |
| path: site | |
| deploy: | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 |