Skip to content

Refactor GitHub Actions workflow for documentation deployment #10

Refactor GitHub Actions workflow for documentation deployment

Refactor GitHub Actions workflow for documentation deployment #10

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
rust:
name: Rust
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install Rust
run: rustup toolchain install stable --profile minimal --component rustfmt
- name: Check formatting
run: cargo +stable fmt --all -- --check
- name: Build
run: cargo +stable build --workspace --locked
- name: Test
run: cargo +stable test --workspace --locked
- name: Smoke test CLI
run: |
cargo +stable run -q -p ferrisgrid-cli -- doctor --backend fake
cargo +stable run -q -p ferrisgrid-cli -- observe --backend fake --output-dir .ferrisgrid-ci
docs:
name: Docs
runs-on: ubuntu-24.04
defaults:
run:
working-directory: docs/official
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 24
- name: Print docs toolchain
run: |
node --version
npm --version
npm pkg get name version private
- name: Install dependencies
run: npm ci
- name: Build docs
run: npm run docs:build
docker:
name: Docker
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Build Linux workspace image
uses: docker/build-push-action@v7
with:
context: .
file: docker/linux-workspace.Dockerfile
platforms: linux/amd64
push: false
tags: ferrisgrid-linux-workspace:ci
cache-from: type=gha
cache-to: type=gha,mode=max