2023-10-25 20:51:36 +00:00
|
|
|
name: Docs
|
2020-06-18 15:50:21 +00:00
|
|
|
|
|
|
|
on:
|
2024-01-06 07:58:34 +00:00
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- '.github/workflows/docs.yml'
|
2020-06-18 15:50:21 +00:00
|
|
|
push:
|
2020-06-23 01:53:50 +00:00
|
|
|
branches:
|
2023-10-24 01:53:39 +00:00
|
|
|
- trunk
|
2020-06-18 15:50:21 +00:00
|
|
|
|
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
|
|
|
|
|
2020-06-18 15:50:21 +00:00
|
|
|
jobs:
|
2020-06-23 01:53:50 +00:00
|
|
|
build:
|
2020-06-18 15:50:21 +00:00
|
|
|
runs-on: ubuntu-latest
|
2020-06-23 01:53:50 +00:00
|
|
|
|
2020-06-18 15:50:21 +00:00
|
|
|
steps:
|
2020-06-23 01:53:50 +00:00
|
|
|
- name: Checkout the code
|
2023-09-05 13:27:38 +00:00
|
|
|
uses: actions/checkout@v4
|
2020-07-23 21:13:04 +00:00
|
|
|
with:
|
|
|
|
persist-credentials: false
|
2020-06-18 15:50:21 +00:00
|
|
|
|
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)
|
2022-05-04 21:35:45 +00:00
|
|
|
run: cargo +stable doc --no-deps --lib
|
2020-06-23 03:40:22 +00:00
|
|
|
if: ${{ failure() }}
|
2020-06-18 15:50:21 +00:00
|
|
|
|
2020-06-23 01:53:50 +00:00
|
|
|
- name: Deploy the docs
|
2024-09-30 06:28:48 +00:00
|
|
|
uses: JamesIves/github-pages-deploy-action@v4.6.8
|
2024-01-06 07:58:34 +00:00
|
|
|
if: github.ref == 'refs/heads/trunk'
|
2020-06-18 15:50:21 +00:00
|
|
|
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
|