2023-04-15 10:36:15 +02:00
|
|
|
name: "Validate flake & check documentation"
|
2023-04-15 10:34:34 +02:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths:
|
|
|
|
- docs/**
|
|
|
|
jobs:
|
2023-04-15 10:36:15 +02:00
|
|
|
flake-docs-check:
|
|
|
|
name: Validate Flake Documentation
|
2023-04-15 10:34:34 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
package:
|
2023-10-01 15:17:48 +02:00
|
|
|
- docs
|
|
|
|
- docs-html
|
|
|
|
- docs-manpages
|
|
|
|
- docs-json
|
2023-04-15 10:34:34 +02:00
|
|
|
steps:
|
2023-10-20 11:24:24 +02:00
|
|
|
- name: Install Nix
|
|
|
|
uses: DeterminateSystems/nix-installer-action@main
|
|
|
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
2023-04-15 10:38:51 +02:00
|
|
|
|
2024-11-26 08:52:11 +01:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
2023-10-01 15:17:48 +02:00
|
|
|
|
2023-04-15 10:34:34 +02:00
|
|
|
- name: Set default git branch (to reduce log spam)
|
|
|
|
run: git config --global init.defaultBranch main
|
2023-10-01 15:17:48 +02:00
|
|
|
|
2023-10-20 11:24:24 +02:00
|
|
|
- name: Build documentation packages
|
2023-04-15 10:34:34 +02:00
|
|
|
run: nix build .#${{ matrix.package }} --print-build-logs
|
2023-10-01 15:17:48 +02:00
|
|
|
|
2024-01-16 12:32:38 +01:00
|
|
|
- name: Get current date
|
|
|
|
id: get-date
|
|
|
|
# output format: 2023-12-22-120000
|
|
|
|
run: echo "date=$(date +'%Y-%m-%d-%H%M%S')" >> ${GITHUB_OUTPUT}
|
|
|
|
|
2023-05-03 12:32:45 +02:00
|
|
|
- name: Upload doc artifacts
|
2023-12-14 20:32:56 +01:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-05-03 12:32:45 +02:00
|
|
|
with:
|
2024-01-16 12:32:38 +01:00
|
|
|
name: "${{ matrix.package }}"
|
2024-04-28 19:35:31 +02:00
|
|
|
path: result/share/doc/nvf
|
2024-11-26 08:52:11 +01:00
|
|
|
flake-docs-linkcheck:
|
|
|
|
name: Validate hyperlinks in documentation sources
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Install Nix
|
|
|
|
uses: DeterminateSystems/nix-installer-action@main
|
|
|
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
2024-11-25 16:59:03 +01:00
|
|
|
|
2024-11-26 08:52:11 +01:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
2024-11-25 16:59:03 +01:00
|
|
|
|
2024-11-26 08:52:11 +01:00
|
|
|
- name: Build documentation packages
|
|
|
|
run: nix build .#docs-linkcheck -Lv
|