Skip to content

docs: enhance root README.md #85

docs: enhance root README.md

docs: enhance root README.md #85

Workflow file for this run

name: Deploy Documentation
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Configure Git
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Format and lint code
run: |
echo "Formatting code..."
make format
echo "Checking code style..."
make lint
git add .
git diff --quiet && git diff --staged --quiet || git commit -m "style: format code and documentation"
- name: Update logs
run: |
echo "Updating logs..."
python docs/scripts/log_management/update_logs.py
python docs/scripts/log_management/calculate_dev_hours.py
git add docs/meta/logs/
git add docs/index.md
git add mkdocs.yml
git diff --quiet && git diff --staged --quiet || git commit -m "chore: update logs navigation and development hours"
- name: Install dependencies for image processing
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Process and validate images
run: |
echo "Checking images..."
python docs/scripts/image_management/image_processing.py --directory docs/ --check
echo "Processing images..."
python docs/scripts/image_management/image_processing.py --directory docs/
git add docs/
git diff --quiet && git diff --staged --quiet || git commit -m "chore: process and optimize images"
- name: Format documentation
run: |
echo "Formatting documentation..."
python docs/scripts/doc_validation/format_docs.py
git add docs/
git diff --quiet && git diff --staged --quiet || git commit -m "chore: format documentation"
- name: Validate documentation
run: make validate-docs
- name: Build site
run: mkdocs build
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: site
- name: Deploy to GitHub Pages
id: deployment
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/deploy-pages@v3