Use Github Actions to automatically deploy documentation
This commit is contained in:
parent
4b05ee5f0a
commit
ea33128014
@ -1,2 +1,5 @@
|
|||||||
[alias]
|
[alias]
|
||||||
xtask = "run --package xtask --"
|
xtask = "run --package xtask --"
|
||||||
|
|
||||||
|
[doc.extern-map.registries]
|
||||||
|
crates-io = "https://docs.rs/"
|
||||||
|
29
.github/workflows/docs.yaml
vendored
Normal file
29
.github/workflows/docs.yaml
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install nightly rust toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
# Needed for use of unstable options
|
||||||
|
toolchain: nightly
|
||||||
|
override: true
|
||||||
|
- name: Build docs
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
env:
|
||||||
|
RUSTDOCFLAGS: "--enable-index-page -Zunstable-options"
|
||||||
|
with:
|
||||||
|
command: doc
|
||||||
|
args: --no-deps --workspace --exclude xtask --features api,events,signatures,appservice-api,client-api,federation-api,identity-service-api,push-gateway-api,either,rand,markdown,compat,unstable-pre-spec -Zrustdoc-map
|
||||||
|
- name: Deploy to docs branch
|
||||||
|
uses: JamesIves/github-pages-deploy-action@4.1.0
|
||||||
|
with:
|
||||||
|
branch: docs
|
||||||
|
folder: target/doc
|
Loading…
x
Reference in New Issue
Block a user