Files
songbird/.github/workflows/docs.yml
Kyle Simpson aaab97511d Library: Add compatibility for legacy Tokio 0.2 (#40)
Adds support to the library for tokio 0.2 backward-compatibility. This should hopefully benefit, and prevent lavalink-rs from being blocked on this feature.

These can be reached using, e.g., `gateway-tokio-02`, `driver-tokio-02`, `serenity-rustls-tokio-02`, and `serenity-native-tokio-02` features.

Naturally, this requires some jiggering about with features and the underlying CI, which has been taken care of. Twilight can't be handled in this way, as their last tokio 0.2 version uses the deprecated Discord Gateway v6.
2021-02-04 02:34:07 +00:00

63 lines
1.5 KiB
YAML

name: Publish docs
on:
push:
branches:
- current
- next
jobs:
docs:
name: Publish docs
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install toolchain
id: tc
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libopus-dev
- name: Setup cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target/debug
key: ${{ runner.os }}-gh-pages-${{ steps.tc.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.toml') }}
- name: Build docs
env:
RUSTDOCFLAGS: -D broken_intra_doc_links
run: |
cargo doc --no-deps --features full-doc
- name: Prepare docs
shell: bash -e -O extglob {0}
run: |
DIR=${GITHUB_REF/refs\/+(heads|tags)\//}
mkdir -p ./docs/$DIR
touch ./docs/.nojekyll
echo '<meta http-equiv="refresh" content="0;url=songbird/index.html">' > ./docs/$DIR/index.html
mv ./target/doc/* ./docs/$DIR/
- name: Deploy docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./docs
allow_empty_commit: false
keep_files: true