Skip to content

Merge pull request #633 from chenghuaWang/wch-main #107

Merge pull request #633 from chenghuaWang/wch-main

Merge pull request #633 from chenghuaWang/wch-main #107

Workflow file for this run

name: Deploy Documentation to GitHub Pages
on:
push:
branches:
- main
paths:
- "docs/**"
- ".github/workflows/docs-deploy.yml"
pull_request:
branches:
- main
paths:
- "docs/**"
- ".github/workflows/docs-deploy.yml"
jobs:
build-and-deploy:
if: github.repository == 'UbiquitousLearning/mllm'
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f docs/requirements.txt ]; then
pip install -r docs/requirements.txt
fi
pip install sphinx
- name: Build documentation
run: |
cd docs
make html
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/build/html/
- name: Deploy to GitHub Pages
if: github.event_name == 'push'
uses: actions/deploy-pages@v4