Add niri-ipc rustdoc generation
Browse files at this commita2c855315c09ae5b4cc686a4605da7d5fdb99b48Parent: 6c4e4b3- ci
- Add niri-ipc rustdoc generation
2 changed files +31 -0
- .github/workflows/ci.yml +25 -0
- resources/rustdoc-index.html +6 -0
.github/workflows/ci.ymlmodified+25 -0
| @@ -207,3 +207,28 @@ jobs: | |||
| 207 | lfs: true | 207 | lfs: true |
| 208 | show-progress: false | 208 | show-progress: false |
| 209 | - uses: Andrew-Chen-Wang/github-wiki-action@86138cbd6328b21d759e89ab6e6dd6a139b22270 | 209 | - uses: Andrew-Chen-Wang/github-wiki-action@86138cbd6328b21d759e89ab6e6dd6a139b22270 |
| 210 | + | ||
| 211 | + rustdoc: | ||
| 212 | + needs: build | ||
| 213 | + permissions: | ||
| 214 | + contents: write | ||
| 215 | + runs-on: ubuntu-22.04 | ||
| 216 | + steps: | ||
| 217 | + - uses: actions/checkout@v4 | ||
| 218 | + with: | ||
| 219 | + show-progress: false | ||
| 220 | + | ||
| 221 | + - uses: dtolnay/rust-toolchain@stable | ||
| 222 | + | ||
| 223 | + - name: Generate documentation | ||
| 224 | + run: cargo doc --no-deps -p niri-ipc | ||
| 225 | + | ||
| 226 | + - run: cp ./resources/rustdoc-index.html ./target/doc/index.html | ||
| 227 | + | ||
| 228 | + - name: Deploy documentation | ||
| 229 | + if: github.ref == 'refs/heads/main' | ||
| 230 | + uses: peaceiris/actions-gh-pages@v4 | ||
| 231 | + with: | ||
| 232 | + github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| 233 | + publish_dir: ./target/doc | ||
| 234 | + force_orphan: true | ||
resources/rustdoc-index.htmladded+6 -0
| @@ -0,0 +1,6 @@ | |||
| 1 | +<!DOCTYPE html> | ||
| 2 | +<html> | ||
| 3 | + <head> | ||
| 4 | + <meta http-equiv=refresh content=0;url=niri_ipc/index.html /> | ||
| 5 | + </head> | ||
| 6 | +</html> | ||