Skip to content

Commit 7476e72

Browse files
authored
Merge pull request #373 from roboflow/lean/publish-mkdocs
Publish mkdocs in gh-pages when a new release is created
2 parents 8e3c9a1 + 9c82fde commit 7476e72

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/publish.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,35 @@ jobs:
3030
PYPI_TEST_PASSWORD: ${{ secrets.PYPI_TEST_PASSWORD }}
3131
run: |
3232
make publish -e PYPI_USERNAME=$PYPI_USERNAME -e PYPI_PASSWORD=$PYPI_PASSWORD -e PYPI_TEST_PASSWORD=$PYPI_TEST_PASSWORD
33+
34+
deploy-docs:
35+
needs: build
36+
runs-on: ubuntu-latest
37+
permissions:
38+
contents: write
39+
steps:
40+
- name: 🛎️ Checkout
41+
uses: actions/checkout@v4
42+
with:
43+
fetch-depth: 0
44+
45+
- name: 🐍 Set up Python
46+
uses: actions/setup-python@v5
47+
with:
48+
python-version: '3.8'
49+
50+
- name: 📚 Install MkDocs and dependencies
51+
run: |
52+
python -m pip install --upgrade pip
53+
pip install mkdocs-material mkdocstrings mkdocstrings[python]
54+
pip install ".[dev]"
55+
56+
- name: 🏗️ Build documentation
57+
run: |
58+
mkdocs build
59+
60+
- name: 🚀 Deploy to GitHub Pages
61+
uses: peaceiris/actions-gh-pages@v3
62+
with:
63+
github_token: ${{ secrets.GITHUB_TOKEN }}
64+
publish_dir: ./site

0 commit comments

Comments
 (0)