@@ -24,43 +24,63 @@ jobs:
2424 steps :
2525 - name : Checkout repository
2626 uses : actions/checkout@v4
27+
2728 - name : Setup uv
2829 uses : astral-sh/setup-uv@v6
30+
2931 - name : Install dependencies
3032 run : uv sync && uv pip install ./mule ./um_utils
33+
3134 - name : Build mule docs
3235 run : uv run make clean html --directory ./mule/docs
3336 working-directory : ${{ github.workspace }}
37+
3438 - name : Build um_utils docs
3539 run : uv run make clean html --directory ./um_utils/docs
3640 working-directory : ${{ github.workspace }}
37- # - id: permissions
38- # name: Set permissions
39- # run: |
40- # chmod -c -R +rX "./doc/_build/html/"
41+
42+ # Deploy Steps
43+ - name : Copy Built Documentation
44+ if : github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
45+ run : |
46+ mkdir _docs
47+ cp -r ./mule/docs/build/html _docs/mule
48+ cp -r ./um_utils/docs/build/html _docs/um_utils
49+
50+ echo '<ul style="font-size: 24px; padding: 50px;">
51+ <li><a href="mule/index.html">Mule Documentation</a></li>
52+ <li><a href="um_utils/index.html">UM Utils Documentation</a></li>
53+ </ul>' > _docs/index.html
54+
4155 - name : Upload artifacts
56+ if : github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
4257 uses : actions/upload-pages-artifact@v4
4358 with :
4459 name : github-pages
45- path : ./mule/docs/build/html
60+ path : ./_docs
61+
4662 - name : Minimize uv cache
4763 if : always()
4864 run : uv cache prune --ci
4965
5066 # Deploy job
5167 deploy :
5268 if : github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
69+
5370 # Add a dependency to the build job
5471 needs : build-docs
5572 permissions :
5673 pages : write # to deploy to Pages
5774 id-token : write # to verify the deployment originates from an appropriate source
75+
5876 # Deploy to the github-pages environment
5977 environment :
6078 name : github-pages
6179 url : ${{ steps.deployment.outputs.page_url }}
80+
6281 # Specify runner + deployment step
6382 runs-on : ubuntu-latest
83+
6484 steps :
6585 - name : Deploy to GitHub Pages
6686 id : deployment
0 commit comments