Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/docs.yml
Comment thread
aaishwarymishra marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: docs

on:
push:
branches: [main]
paths:
- "docs/**"
- "mkdocs.yml"
- "pyproject.toml"
- "uv.lock"
- ".github/workflows/docs.yml"
pull_request:
branches: [main]

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Install uv and Python
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
enable-cache: true
python-version: "3.11"

- name: Sync docs dependencies
run: uv sync --locked --group docs

- name: Build docs
run: uv run --group docs mkdocs build --strict

- name: Configure Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0

- name: Upload artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
Comment thread
aaishwarymishra marked this conversation as resolved.
Resolved
with:
path: site

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
Comment thread
aaishwarymishra marked this conversation as resolved.
Resolved
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ conda_build/
pytest.ini

.vscode/*
site/
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,4 +298,6 @@ Each example is a standalone project — `cd` into it, install dependencies, and

---

Full documentation is available at [pytorch-ignite.github.io/trainite](https://pytorch-ignite.github.io/trainite/).

> For contributor and development docs, see [CONTRIBUTING.md](CONTRIBUTING.md).
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
site_name: Trainite
site_description: Documentation for Trainite
site_url: https://pytorch-ignite.github.io/trainite/
repo_url: https://github.com/pytorch-ignite/trainite

theme:
Expand Down
7 changes: 7 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[build]
command = "pip install uv && uv sync --locked --group docs && uv run mkdocs build --strict"
publish = "site"
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF -- docs/ mkdocs.yml pyproject.toml uv.lock"

[build.environment]
PYTHON_VERSION = "3.11"
Comment thread
aaishwarymishra marked this conversation as resolved.
Resolved
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ dynamic = ["version"]
[project.urls]
Homepage = "https://pytorch-ignite.ai"
Repository = "https://github.com/pytorch-ignite/trainite"
Documentation = "https://pytorch-ignite.github.io/trainite/"

[project.scripts]
trainite = "trainite.cli:main"
Expand Down
Loading