-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #140 from roboflow/docs/mkdocs-insiders
ci(docs): 👷 update docs ci with mkdocs-insiders and use uv
- Loading branch information
Showing
4 changed files
with
96 additions
and
87 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Build and Publish Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
workflow_dispatch: | ||
release: | ||
types: [published] | ||
|
||
# Ensure only one concurrent deployment | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.ref}} | ||
cancel-in-progress: true | ||
|
||
# Restrict permissions by default | ||
permissions: | ||
contents: write # Required for committing to gh-pages | ||
pages: write # Required for deploying to Pages | ||
pull-requests: write # Required for PR comments | ||
|
||
jobs: | ||
doc-deploy: | ||
name: Publish Docs | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: documentation-deployment | ||
url: https://maestro.roboflow.com/ | ||
timeout-minutes: 10 | ||
strategy: | ||
matrix: | ||
python-version: ["3.10"] | ||
steps: | ||
- name: 📥 Checkout the repository | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: 🐍 Install uv and set Python ${{ matrix.python-version }} | ||
uses: astral-sh/setup-uv@4db96194c378173c656ce18a155ffc14a9fc4355 # v5.2.2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: 🔑 Create GitHub App token (mkdocs) | ||
id: mkdocs_token | ||
uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755 # v1.11.1 | ||
with: | ||
app-id: ${{ secrets.MKDOCS_APP_ID }} | ||
private-key: ${{ secrets.MKDOCS_PEM }} | ||
owner: roboflow | ||
repositories: mkdocs-material-insiders | ||
|
||
- name: 🏗️ Install dependencies | ||
run: | | ||
uv pip install -r pyproject.toml --extra docs | ||
uv pip install -e ".[docs]" | ||
# Install mkdocs-material-insiders using the GitHub App token | ||
uv pip install "git+https://roboflow:${{ steps.mkdocs_token.outputs.token }}@github.com/roboflow/[email protected]#egg=mkdocs-material[imaging]" | ||
- name: ⚙️ Configure git for github-actions | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
- name: 🚀 Deploy Development Docs | ||
if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') || github.event_name == 'workflow_dispatch' | ||
run: | | ||
MKDOCS_GIT_COMMITTERS_APIKEY=${{ secrets.GITHUB_TOKEN }} uv run mike deploy --push develop | ||
- name: 🚀 Deploy Release Docs | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
run: | | ||
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`) | ||
MKDOCS_GIT_COMMITTERS_APIKEY=${{ secrets.GITHUB_TOKEN }} uv run mike deploy --push --update-aliases $latest_tag latest |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: 🧪 Maestro Docs Test WorkFlow 📚 | ||
name: 🧪 Docs Test WorkFlow 📚 | ||
|
||
on: | ||
pull_request: | ||
|
@@ -22,13 +22,28 @@ jobs: | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 0 | ||
- name: 🐍 Set up Python | ||
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 | ||
|
||
- name: 🐍 Install uv and set Python ${{ matrix.python-version }} | ||
uses: astral-sh/setup-uv@4db96194c378173c656ce18a155ffc14a9fc4355 # v5.2.2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: 🔑 Create GitHub App token (mkdocs) | ||
id: mkdocs_token | ||
uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755 # v1.11.1 | ||
with: | ||
python-version: '3.10' | ||
app-id: ${{ secrets.MKDOCS_APP_ID }} | ||
private-key: ${{ secrets.MKDOCS_PEM }} | ||
owner: roboflow | ||
repositories: mkdocs-material-insiders | ||
|
||
- name: 🏗️ Install dependencies | ||
run: | | ||
uv pip install -r pyproject.toml --extra docs | ||
uv pip install -e ".[docs]" | ||
# Install mkdocs-material-insiders using the GitHub App token | ||
uv pip install "git+https://roboflow:${{ steps.mkdocs_token.outputs.token }}@github.com/roboflow/[email protected]#egg=mkdocs-material[imaging]" | ||
- name: 📦 Install Packages | ||
run: pip install -e ".[docs]" | ||
- name: 🧪 Test Docs Build | ||
run: mkdocs build --verbose | ||
run: uv run mkdocs build --verbose |