Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

#20157 Fix `hub/pro.md` docs page indentation issues

Merged
Ghost merged 3 commits into Ultralytics:main from ultralytics:fix-indentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
  1. # Ultralytics ๐Ÿš€ AGPL-3.0 License - https://ultralytics.com/license
  2. # Publish pip package to PyPI https://pypi.org/project/ultralytics/
  3. name: Publish to PyPI
  4. on:
  5. push:
  6. branches: [main]
  7. workflow_dispatch:
  8. inputs:
  9. pypi:
  10. type: boolean
  11. description: Publish to PyPI
  12. jobs:
  13. check:
  14. if: github.repository == 'ultralytics/ultralytics' && github.actor == 'glenn-jocher'
  15. runs-on: ubuntu-latest
  16. permissions:
  17. contents: write
  18. outputs:
  19. increment: ${{ steps.check_pypi.outputs.increment }}
  20. current_tag: ${{ steps.check_pypi.outputs.current_tag }}
  21. previous_tag: ${{ steps.check_pypi.outputs.previous_tag }}
  22. steps:
  23. - uses: actions/checkout@v4
  24. - uses: actions/setup-python@v5
  25. with:
  26. python-version: "3.x"
  27. - uses: astral-sh/setup-uv@v5
  28. - run: uv pip install --system --no-cache ultralytics-actions
  29. - id: check_pypi
  30. shell: python
  31. run: |
  32. import os
  33. from actions.utils import check_pypi_version
  34. local_version, online_version, publish = check_pypi_version()
  35. os.system(f'echo "increment={publish}" >> $GITHUB_OUTPUT')
  36. os.system(f'echo "current_tag=v{local_version}" >> $GITHUB_OUTPUT')
  37. os.system(f'echo "previous_tag=v{online_version}" >> $GITHUB_OUTPUT')
  38. if publish:
  39. print('Ready to publish new version to PyPI โœ….')
  40. - name: Tag and Release
  41. if: steps.check_pypi.outputs.increment == 'True'
  42. env:
  43. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  44. CURRENT_TAG: ${{ steps.check_pypi.outputs.current_tag }}
  45. PREVIOUS_TAG: ${{ steps.check_pypi.outputs.previous_tag }}
  46. OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
  47. run: |
  48. git config --global user.name "UltralyticsAssistant"
  49. git config --global user.email "web@ultralytics.com"
  50. git tag -a "$CURRENT_TAG" -m "$(git log -1 --pretty=%B)"
  51. git push origin "$CURRENT_TAG"
  52. ultralytics-actions-summarize-release
  53. uv cache prune --ci
  54. build:
  55. needs: check
  56. if: needs.check.outputs.increment == 'True'
  57. runs-on: ubuntu-latest
  58. permissions:
  59. contents: read
  60. steps:
  61. - uses: actions/checkout@v4
  62. - uses: actions/setup-python@v5
  63. with:
  64. python-version: "3.x"
  65. - uses: astral-sh/setup-uv@v5
  66. - run: uv pip install --system --no-cache build
  67. - run: python -m build
  68. - uses: actions/upload-artifact@v4
  69. with:
  70. name: dist
  71. path: dist/
  72. - run: uv cache prune --ci
  73. publish:
  74. needs: [check, build]
  75. if: needs.check.outputs.increment == 'True'
  76. runs-on: ubuntu-latest
  77. environment: # for GitHub Deployments tab
  78. name: Release - PyPI
  79. url: https://pypi.org/p/ultralytics
  80. permissions:
  81. id-token: write # for PyPI trusted publishing
  82. steps:
  83. - uses: actions/download-artifact@v4
  84. with:
  85. name: dist
  86. path: dist/
  87. - uses: pypa/gh-action-pypi-publish@release/v1
  88. notify:
  89. needs: [check, publish]
  90. if: always() && needs.check.outputs.increment == 'True'
  91. runs-on: ubuntu-latest
  92. steps:
  93. - uses: actions/checkout@v4
  94. - name: Extract PR Details
  95. env:
  96. GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  97. run: |
  98. PR_JSON=$(gh pr list --search "${GITHUB_SHA}" --state merged --json number,title --jq '.[0]')
  99. PR_NUMBER=$(echo "${PR_JSON}" | jq -r '.number')
  100. PR_TITLE=$(echo "${PR_JSON}" | jq -r '.title')
  101. echo "PR_NUMBER=${PR_NUMBER}" >> "${GITHUB_ENV}"
  102. echo "PR_TITLE=${PR_TITLE}" >> "${GITHUB_ENV}"
  103. - name: Notify Success
  104. if: needs.publish.result == 'success' && github.event_name == 'push'
  105. uses: slackapi/slack-github-action@v2.0.0
  106. with:
  107. webhook-type: incoming-webhook
  108. webhook: ${{ secrets.SLACK_WEBHOOK_URL_YOLO }}
  109. payload: |
  110. text: "<!channel> GitHub Actions success for ${{ github.workflow }} โœ…\n\n\n*Repository:* https://github.com/${{ github.repository }}\n*Action:* https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Author:* ${{ github.actor }}\n*Event:* NEW `${{ github.repository }} ${{ needs.check.outputs.current_tag }}` pip package published ๐Ÿ˜ƒ\n*Job Status:* ${{ job.status }}\n*Pull Request:* <https://github.com/${{ github.repository }}/pull/${{ env.PR_NUMBER }}> ${{ env.PR_TITLE }}\n"
  111. - name: Notify Failure
  112. if: needs.publish.result != 'success'
  113. uses: slackapi/slack-github-action@v2.0.0
  114. with:
  115. webhook-type: incoming-webhook
  116. webhook: ${{ secrets.SLACK_WEBHOOK_URL_YOLO }}
  117. payload: |
  118. text: "<!channel> GitHub Actions error for ${{ github.workflow }} โŒ\n\n\n*Repository:* https://github.com/${{ github.repository }}\n*Action:* https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Author:* ${{ github.actor }}\n*Event:* ${{ github.event_name }}\n*Job Status:* ${{ job.status }}\n*Pull Request:* <https://github.com/${{ github.repository }}/pull/${{ env.PR_NUMBER }}> ${{ env.PR_TITLE }}\n"
Discard
Tip!

Press p or to see the previous file or, n or to see the next file