Skip to content

changing site url

changing site url #8

Workflow file for this run

name: CI & Deploy
on:
push:
branches: ["master", "main"]
pull_request:
branches: ["master", "main"]
jobs:
test:
name: Setup and Run Tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install project and dependencies
run: |
uv sync --all-extras --dev
uv pip install -e . --no-deps
- name: Run tests
run: uv run pytest tests
deploy-docs:
name: Deploy MkDocs Site to GitHub Pages
runs-on: ubuntu-latest
needs: test # Only run this job if the 'test' job succeeds
# Only run this job on pushes to the 'master' or 'main' branch, NOT on pull requests
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
concurrency:
group: "pages"
cancel-in-progress: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install dependencies for docs
run: |
uv add networkx mkdocs-material mkdocs
uv sync --all-extras
uv pip install -e . --no-deps
- name: Generate Graph Example HTML Files
run: uv run generate_graph_examples.py
- name: Build MkDocs site
run: uv run mkdocs build --verbose
- name: Upload artifact for GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
path: './site' # Path to the directory containing the built MkDocs site
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
# This action will automatically use the artifact uploaded in the previous step