Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
65 changes: 19 additions & 46 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,82 +1,55 @@
# Sample workflow for building and deploying a Hugo site to GitHub Pages
name: Deploy FastVideo Docs to Pages
name: Deploy Documentation

on:
# Runs on pushes targeting the default branch
push:
branches:
- main
paths:
- "docs/**/*.md"
- "fastvideo/examples/**/*.py"
branches: [ main ]
pull_request:
branches:
- main
types: [opened, ready_for_review, synchronize, reopened]
paths:
- "docs/**/*.md"
- "fastvideo/examples/**/*.py"
branches: [ main ]

# 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 only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

# Default to bash
defaults:
run:
shell: bash

jobs:
pre-commit:
uses: ./.github/workflows/pre-commit.yml

# Build job
build:
runs-on: ubuntu-latest
needs: pre-commit
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Set up Python
uses: actions/setup-python@v5

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: '3.12'

- name: Install dependencies
run: |
cd docs
pip install -r requirements-docs.txt
- name: Build docs
run: |
cd docs
make clean
make html
python -m pip install --upgrade pip
pip install -r requirements-mkdocs.txt

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Build documentation
run: mkdocs build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./docs/build/html
path: ./site

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
if: ${{ github.event_name == 'push' }}
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main'
steps:
- name: Deploy to GitHub Pages
id: deployment
Expand Down
17 changes: 10 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ wandb/
*.pt
cache_dir/
wandb/
venv/
.venv/
runs/
samples/
*validation/
Expand All @@ -37,12 +39,13 @@ dist/
eggs/
.eggs/

# Sphinx documentation
docs/_build/
docs/source/getting_started/examples/
docs/source/inference/examples/
docs/source/training/examples/
docs/source/distillation/examples/
# MkDocs documentation
site/
docs/getting_started/examples/
docs/inference/examples/
docs/training/examples/
docs/distillation/examples/
!requirements-mkdocs.txt

# VSCode
.vscode/
Expand All @@ -61,7 +64,7 @@ docs/source/distillation/examples/
!fastvideo/tests/ssim/reference_videos/**/*.mp4

# Static images
!docs/source/_static/images/**/*.png
!docs/assets/images/**/*.png
!comfyui/assets/**/*.png
!comfyui/assets/**/*.gif

Expand Down
26 changes: 0 additions & 26 deletions docs/Makefile

This file was deleted.

35 changes: 25 additions & 10 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,35 @@
# FastVideo documents
# FastVideo Documentation

## Build the docs
This directory contains the FastVideo documentation built with MkDocs.

## Build the docs locally

```bash
# Install dependencies.
pip install -r requirements-docs.txt
# Install dependencies
pip install -r docs/requirements-mkdocs.txt

# Serve docs with live reload (recommended for development)
mkdocs serve

# Build the docs.
make clean
make html
# Or build static site
mkdocs build
```

## Open the docs with your browser
## View the docs

### Development server (with live reload)
```bash
mkdocs serve
```
Then open your browser to: http://127.0.0.1:8000

### Static build
```bash
python -m http.server -d build/html/
mkdocs build
python -m http.server -d site/
```
Then open your browser to: http://localhost:8000

## Automatic Deployment

Launch your browser and open localhost:8000.
Documentation is automatically built and deployed to GitHub Pages when changes are pushed to the `main` branch via the `.github/workflows/docs.yml` workflow.
Loading