Skip to content

Commit

Permalink
Update format.yml (#39)
Browse files Browse the repository at this point in the history
Co-authored-by: glenn-jocher <glenn.jocher@ultralytics.com>
  • Loading branch information
UltralyticsAssistant and glenn-jocher authored Jan 1, 2024
1 parent a835643 commit 6d67089
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 43 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ultralytics 🚀, AGPL-3.0 license
# Ultralytics Format Workflow
# This workflow automatically formats code and documentation in pull requests and pushes to main branch
# Ultralytics 🚀 - AGPL-3.0 license
# Ultralytics Actions https://github.com/ultralytics/actions
# This workflow automatically formats code and documentation in PRs to official Ultralytics standards

name: Ultralytics Actions

Expand All @@ -14,7 +14,10 @@ jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Run Ultralytics Formatting Actions
- name: Run Ultralytics Formatting
uses: ultralytics/actions@main
with:
python: true
docstrings: true
markdown: true
spelling: true
77 changes: 40 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Ultralytics Docs are the gateway to understanding and utilizing our cutting-edge machine learning tools. These documents are deployed to [https://docs.ultralytics.com](https://docs.ultralytics.com) for your convenience.

[![pages-build-deployment](https://github.com/ultralytics/docs/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/ultralytics/docs/actions/workflows/pages/pages-build-deployment) [![Check Broken links](https://github.com/ultralytics/docs/actions/workflows/links.yml/badge.svg)](https://github.com/ultralytics/docs/actions/workflows/links.yml)
[![pages-build-deployment](https://github.com/ultralytics/docs/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/ultralytics/docs/actions/workflows/pages/pages-build-deployment) [![Check Broken links](https://github.com/ultralytics/docs/actions/workflows/links.yml/badge.svg)](https://github.com/ultralytics/docs/actions/workflows/links.yml)

## 🛠️ Installation

Expand All @@ -15,21 +15,21 @@ To install the ultralytics package in developer mode, ensure you have Git and Py

1. Clone the ultralytics repository to your local machine using Git:

```bash
git clone https://github.com/ultralytics/ultralytics.git
```
```bash
git clone https://github.com/ultralytics/ultralytics.git
```

2. Navigate to the cloned repository's root directory:

```bash
cd ultralytics
```
```bash
cd ultralytics
```

3. Install the package in developer mode using pip (or pip3 for Python 3):

```bash
pip install -e '.[dev]'
```
```bash
pip install -e '.[dev]'
```

- This command installs the ultralytics package along with all development dependencies, allowing you to modify the package code and have the changes immediately reflected in your Python environment.

Expand All @@ -41,47 +41,49 @@ The `mkdocs serve` command builds and serves a local version of your MkDocs docu
mkdocs serve
```

+ #### Command Breakdown:
- #### Command Breakdown:

- `mkdocs` is the main MkDocs command-line interface.
- `serve` is the subcommand to build and locally serve your documentation.

+ 🧐 Note:
- 🧐 Note:

- Grasp changes to the docs in real-time as `mkdocs serve` supports live reloading.
- To stop the local server, press `CTRL+C`.

## 🌍 Building and Serving Multi-Language

Supporting multi-language documentation? Follow these steps:

1. Stage all new language *.md files with Git:
1. Stage all new language \*.md files with Git:

```bash
git add docs/**/*.md -f
```
```bash
git add docs/**/*.md -f
```

2. Build all languages to the `/site` folder, ensuring relevant root-level files are present:

```bash
# Clear existing /site directory
rm -rf site
# Loop through each language config file and build
mkdocs build -f docs/mkdocs.yml
for file in docs/mkdocs_*.yml; do
echo "Building MkDocs site with $file"
mkdocs build -f "$file"
done
```
```bash
# Clear existing /site directory
rm -rf site

# Loop through each language config file and build
mkdocs build -f docs/mkdocs.yml
for file in docs/mkdocs_*.yml; do
echo "Building MkDocs site with $file"
mkdocs build -f "$file"
done
```

3. To preview your site, initiate a simple HTTP server:

```bash
cd site
python -m http.server
# Open in your preferred browser
```
```bash
cd site
python -m http.server
# Open in your preferred browser
```

+ 🖥️ Access the live site at `http://localhost:8000`.
- 🖥️ Access the live site at `http://localhost:8000`.

## 📤 Deploying Your Documentation Site

Expand All @@ -90,10 +92,10 @@ Choose a hosting provider and deployment method for your MkDocs documentation:
- Configure `mkdocs.yml` with deployment settings.
- Use `mkdocs deploy` to build and deploy your site.

+ ### GitHub Pages Deployment Example:
```bash
mkdocs gh-deploy
```
* ### GitHub Pages Deployment Example:
```bash
mkdocs gh-deploy
```

- Update the "Custom domain" in your repository's settings for a personalized URL.

Expand All @@ -106,6 +108,7 @@ Choose a hosting provider and deployment method for your MkDocs documentation:
We cherish the community's input as it drives Ultralytics open-source initiatives. Dive into the [Contributing Guide](https://docs.ultralytics.com/help/contributing) and share your thoughts via our [Survey](https://ultralytics.com/survey?utm_source=github&utm_medium=social&utm_campaign=Survey). A heartfelt thank you 🙏 to each contributor!

<!-- Pictorial representation of our dedicated contributor community -->

![Ultralytics open-source contributors](https://github.com/ultralytics/assets/raw/main/im/image-contributors.png)

## 📜 License
Expand Down

0 comments on commit 6d67089

Please sign in to comment.