mirror of
https://github.com/danbulant/cushy
synced 2026-05-19 04:08:38 +00:00
Undocumented and unsupported, but this allows generating example images. This push is testing that the image makes it through CI. Refs #125
80 lines
No EOL
2.4 KiB
YAML
80 lines
No EOL
2.4 KiB
YAML
name: Docs
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
docs:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Install x11 dependencies for Kludgine
|
|
run: |
|
|
sudo apt-get update -y -qq
|
|
sudo add-apt-repository ppa:oibaf/graphics-drivers -y
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Generate Docs
|
|
run: |
|
|
cargo doc --no-deps --all-features --workspace
|
|
|
|
- name: Deploy
|
|
uses: khonsulabs/sync-to-dossier@main
|
|
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/release' || startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
url: ${{ secrets.DOSSIER_URL }}
|
|
api-key-id: ${{ secrets.DOSSIER_API_KEY_ID }}
|
|
api-key: ${{ secrets.DOSSIER_API_KEY }}
|
|
project: cushy
|
|
from: target/doc/
|
|
to: /${{ github.ref_name }}/docs
|
|
|
|
guide:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Install x11 dependencies for Kludgine
|
|
run: |
|
|
sudo apt-get update -y -qq
|
|
sudo add-apt-repository ppa:oibaf/graphics-drivers -y
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
|
|
|
|
- name: Download mdbook
|
|
run: |
|
|
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.36/mdbook-v0.4.36-x86_64-unknown-linux-gnu.tar.gz | tar -xz
|
|
|
|
- name: Install mdbook-variables
|
|
run: |
|
|
cargo install mdbook-variables
|
|
|
|
- name: Regenerate Example Images
|
|
run: |
|
|
CAPTURE=1 cargo test -p cushy --examples
|
|
|
|
- name: Regenerate Guide Example Images
|
|
run: |
|
|
CAPTURE=1 cargo test -p guide-examples --examples
|
|
|
|
- name: Build Guide
|
|
run: |
|
|
./mdbook build guide
|
|
|
|
- name: Deploy
|
|
uses: khonsulabs/sync-to-dossier@main
|
|
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/release' || startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
url: ${{ secrets.DOSSIER_URL }}
|
|
api-key-id: ${{ secrets.DOSSIER_API_KEY_ID }}
|
|
api-key: ${{ secrets.DOSSIER_API_KEY }}
|
|
project: cushy
|
|
from: target/guide/
|
|
to: /${{ github.ref_name }}/guide |