wgpu/.github/workflows/docs.yml

52 lines
1.2 KiB
YAML
Raw Normal View History

2023-10-25 20:51:36 +00:00
name: Docs
on:
2024-01-06 07:58:34 +00:00
pull_request:
paths:
- '.github/workflows/docs.yml'
push:
branches:
2023-10-24 01:53:39 +00:00
- trunk
2023-02-09 15:33:53 +00:00
env:
2024-01-06 07:58:34 +00:00
# We need to use nightly for various features
# when building docs.rs style docs.
NIGHTLY_VERSION: nightly-2023-12-17
2023-02-09 15:33:53 +00:00
CARGO_INCREMENTAL: false
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
2020-07-23 21:13:04 +00:00
with:
persist-credentials: false
2024-01-06 07:58:34 +00:00
- name: Install documentation toolchain
run: rustup toolchain install ${{ env.NIGHTLY_VERSION }} --no-self-update --profile=minimal
2020-06-23 03:40:22 +00:00
- name: Build the docs (nightly)
run: |
2024-01-06 07:58:34 +00:00
cargo +${{ env.NIGHTLY_VERSION }} doc --no-deps --lib
2022-11-23 21:59:59 +00:00
env:
RUSTDOCFLAGS: --cfg docsrs
2020-06-23 03:40:22 +00:00
- name: Build the docs (stable)
run: cargo +stable doc --no-deps --lib
2020-06-23 03:40:22 +00:00
if: ${{ failure() }}
- name: Deploy the docs
uses: JamesIves/github-pages-deploy-action@v4.6.4
2024-01-06 07:58:34 +00:00
if: github.ref == 'refs/heads/trunk'
with:
2023-02-09 15:33:53 +00:00
token: ${{ secrets.WEB_DEPLOY }}
folder: target/doc
repository-name: gfx-rs/wgpu-rs.github.io
branch: master
target-folder: doc