73 lines
1.4 KiB
YAML
73 lines
1.4 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
name: workflow
|
|
|
|
jobs:
|
|
workflow:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
# Setup
|
|
|
|
- name: checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
|
|
- name: mdbook
|
|
uses: peaceiris/actions-mdbook@v1
|
|
with:
|
|
mdbook-version: 'latest'
|
|
|
|
# Run tests
|
|
|
|
- name: run tests
|
|
run: |
|
|
cargo test --all
|
|
|
|
# Generate documentation
|
|
|
|
- name: build mdbook
|
|
run: |
|
|
mdbook build docs -d $(pwd)/public
|
|
|
|
- name: build api docs
|
|
run: |
|
|
cargo doc --workspace --no-deps --document-private-items
|
|
cp -r target/doc public/api
|
|
|
|
- name: deploy
|
|
uses: JamesIves/github-pages-deploy-action@4.0.0
|
|
with:
|
|
branch: gh-pages
|
|
folder: public
|
|
|
|
# Build debian package
|
|
|
|
- name: build-deb
|
|
run: |
|
|
cargo install cargo-deb
|
|
cargo deb
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: panorama.deb
|
|
path: target/debian/panorama*.deb
|
|
|
|
# Cache massively
|
|
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
~/.cargo/bin
|
|
target
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
# vim: set sw=2 et :
|