name: Docs
on:
push:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
env:
RUSTDOCFLAGS: --cfg docsrs -Zunstable-options --generate-link-to-definition
with:
command: doc
args: --package mpris-server --all-features --no-deps
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v4
with:
path: ./target/doc/
deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5