1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

Build the Nix manual in CI and deploy to Netlify

This commit is contained in:
Eelco Dolstra 2024-11-05 16:38:52 +01:00
parent b6101aedb4
commit 0dc5b249ff
3 changed files with 40 additions and 0 deletions

View file

@ -4,6 +4,10 @@ on:
os:
required: true
type: string
manual:
required: false
type: boolean
default: false
jobs:

View file

@ -134,3 +134,30 @@ jobs:
flakehub: true
- uses: DeterminateSystems/flakehub-cache-action@main
- run: nix build -L --out-link ./new-nix && PATH=$(pwd)/new-nix/bin:$PATH MAX_FLAKES=50 flake-regressions/eval-all.sh
manual:
if: github.event_name != 'merge_group'
needs: build_x86_64-linux
runs-on: blacksmith
steps:
- name: Checkout nix
uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
with:
flakehub: true
- uses: DeterminateSystems/flakehub-cache-action@main
- name: Build manual
run: nix build .#hydraJobs.manual
- uses: nwtgck/actions-netlify@v3.0
with:
publish-dir: './result/share/doc/nix/manual'
production-branch: detsys-main
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
enable-pull-request-comment: true
enable-commit-comment: true
enable-commit-status: true
overwrites-pull-request-comment: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}

View file

@ -181,6 +181,15 @@ in
# Nix's manual
manual = nixpkgsFor.x86_64-linux.native.nixComponents.nix-manual;
manualTarball =
with nixpkgsFor.x86_64-linux.native;
runCommand "determinate-nix-manual-${self.hydraJobs.manual.version}"
{ }
''
mkdir -p $out/tarballs
tar cvfz $out/tarballs/$name.tar.gz -C ${self.hydraJobs.manual}/share/doc/nix/manual . --transform "s/^./$name/"
'';
# API docs for Nix's unstable internal C++ interfaces.
internal-api-docs = nixpkgsFor.x86_64-linux.native.nixComponents.nix-internal-api-docs;