@@ -2,9 +2,8 @@ name: Build and Publish Docs
22
33on :
44 push :
5- branches :
6- - develop
7- workflow_dispatch :
5+ branches : [main, develop]
6+ workflow_dispatch : {}
87 release :
98 types : [published]
109
@@ -27,48 +26,36 @@ jobs:
2726 name : documentation-deployment
2827 url : https://rfdetr.roboflow.com/
2928 timeout-minutes : 10
30- strategy :
31- matrix :
32- python-version : ["3.10"]
3329 steps :
3430 - name : 📥 Checkout the repository
3531 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3632 with :
3733 fetch-depth : 0
3834
39- - name : 🐍 Install uv and set Python ${{ matrix.python-version }}
40- uses : astral-sh/setup-uv@4db96194c378173c656ce18a155ffc14a9fc4355 # v5 .2.2
35+ - name : 🐍 Install uv and set Python
36+ uses : astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7 .2.0
4137 with :
42- python-version : ${{ matrix.python-version }}
43-
44- - name : 🔑 Create GitHub App token (mkdocs)
45- id : mkdocs_token
46- uses : actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755 # v1.11.1
47- with :
48- app-id : ${{ secrets.MKDOCS_APP_ID }}
49- private-key : ${{ secrets.MKDOCS_PEM }}
50- owner : roboflow
51- repositories : mkdocs-material-insiders
38+ python-version : " 3.10"
39+ activate-environment : true
5240
5341 - name : 🏗️ Install dependencies
54- run : |
55- uv pip install -r pyproject.toml --extra docs
56- uv pip install -e ".[docs]"
57- # Install mkdocs-material-insiders using the GitHub App token
58- uv pip install "git+https://roboflow:${{ steps.mkdocs_token.outputs.token }}@github.com/roboflow/[email protected] #egg=mkdocs-material[imaging]" 42+ run : uv sync --group docs
5943
6044 - name : ⚙️ Configure git for github-actions
6145 run : |
62- git config --global user.name "github-actions[bot] "
63- git config --global user.email "41898282+ github-actions[bot] @users.noreply.github.com"
46+ git config --global user.name "${{ github.actor }} "
47+ git config --global user.email "${{ github.actor }} @users.noreply.github.com"
6448
6549 - name : 🚀 Deploy Development Docs
6650 if : (github.event_name == 'push' && github.ref == 'refs/heads/develop') || github.event_name == 'workflow_dispatch'
67- run : |
68- MKDOCS_GIT_COMMITTERS_APIKEY=${{ secrets.GITHUB_TOKEN }} uv run mike deploy --push develop
51+ env :
52+ MKDOCS_GIT_COMMITTERS_APIKEY : ${{ secrets.GITHUB_TOKEN }}
53+ run : uv run mike deploy --push develop
6954
7055 - name : 🚀 Deploy Release Docs
7156 if : github.event_name == 'release' && github.event.action == 'published'
57+ env :
58+ MKDOCS_GIT_COMMITTERS_APIKEY : ${{ secrets.GITHUB_TOKEN }}
7259 run : |
7360 latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)
74- MKDOCS_GIT_COMMITTERS_APIKEY=${{ secrets.GITHUB_TOKEN }} uv run mike deploy --push --update-aliases $latest_tag latest
61+ uv run mike deploy --push --update-aliases $latest_tag latest
0 commit comments