2023-10-25 20:51:36 +00:00
|
|
|
name: Docs
|
2020-06-18 15:50:21 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
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:
|
|
|
|
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
|
|
|
|
2023-02-09 15:33:53 +00:00
|
|
|
- name: Install nightly toolchain
|
|
|
|
run: rustup toolchain install nightly --no-self-update --profile=minimal
|
2020-06-23 03:40:22 +00:00
|
|
|
|
|
|
|
- name: Build the docs (nightly)
|
|
|
|
run: |
|
2022-05-04 21:35:45 +00:00
|
|
|
cargo +nightly 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
|
2023-07-19 20:06:24 +00:00
|
|
|
uses: JamesIves/github-pages-deploy-action@v4.4.3
|
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
|