Skip to content

Build fixes (#333) #875

Build fixes (#333)

Build fixes (#333) #875

Workflow file for this run

# build and deploy on master push, otherwise just try to build the page
on:
push:
branches:
- master
pull_request:
name: Build website with Zola, build rust docs and publish to GH pages
jobs:
build:
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/master' && github.repository == 'rust-ml/linfa'
steps:
- name: 'Checkout'
uses: actions/checkout@master
- name: 'Build only'
uses: shalzz/zola-deploy-action@master
env:
BUILD_DIR: docs/website/
TOKEN: ${{ secrets.TOKEN }}
BUILD_ONLY: true
- name: Build Documentation
run: cargo doc --workspace --no-deps
env:
RUSTDOCFLAGS: -D warnings
build_and_deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' || github.repository != 'rust-ml/linfa'
steps:
- name: 'Checkout'
uses: actions/checkout@master
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, rust-src
- name: Build Documentation
run: cargo doc --workspace --no-deps
env:
RUSTDOCFLAGS: -D warnings
- name: Copy Rust Documentation to Zola
run: cp -R "target/doc/" "docs/website/static/rustdocs/"
- name: 'Build and deploy'
uses: shalzz/zola-deploy-action@master
env:
PAGES_BRANCH: gh-pages
BUILD_DIR: docs/website/
TOKEN: ${{ secrets.TOKEN }}