rustdoc-assets 0.2.1

Build script helper which copies media and assets from a source directory below your current crate to the target output directory of rustdoc.
Documentation
stages:
  - build
  - deploy

variables:
  GIT_SUBMODULE_STRATEGY: recursive
  GIT_DEPTH: 1

#-------------------------------------------------------------------------------

build-all:
  stage: build
  needs: []
  tags:
    - rust
  script:
    # code formatting: abort on mismatch
    - cargo fmt -- --check -v
    - cargo clippy
    - cargo build
    - cargo test


pages:
  stage: deploy
  needs: ["build-all"]
  tags:
    - rust
  variables:
    CARGO_TARGET_DIR: public
  script:
    - echo $CARGO_TARGET_DIR
    - cargo doc
    - cargo check # required to execute build.rs
    - echo '<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=doc/rustdoc_assets/index.html"/></head></html>' > public/index.html
  artifacts:
    paths:
      - public
  rules:
    - if: $CI_COMMIT_BRANCH == "master"