From b0b010a0e960bd91c45f06a1a93269e1811adb13 Mon Sep 17 00:00:00 2001 From: traxys Date: Tue, 21 May 2024 19:40:23 +0200 Subject: [PATCH] docs: Deploy both stable & unstable docs to github pages --- .github/workflows/build_documentation.yml | 4 ++-- README.md | 2 ++ build-docs.sh | 9 +++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100755 build-docs.sh diff --git a/.github/workflows/build_documentation.yml b/.github/workflows/build_documentation.yml index ea215ab2..c83673ec 100644 --- a/.github/workflows/build_documentation.yml +++ b/.github/workflows/build_documentation.yml @@ -44,12 +44,12 @@ jobs: name: nix-community authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - - run: nix build .#docs --show-trace + - run: ./build-docs.sh - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: - path: "result/share/doc" + path: "docs-build" - name: Deploy to GitHub Pages id: deployment diff --git a/README.md b/README.md index 96a0e117..d8b9c885 100644 --- a/README.md +++ b/README.md @@ -233,6 +233,8 @@ be. Documentation is available on this project's GitHub Pages page: [https://nix-community.github.io/nixvim](https://nix-community.github.io/nixvim) +The stable documentation is also available at [https://nix-community.github.io/nixvim/stable](https://nix-community.github.io/nixvim/stable). + If the option `enableMan` is set to `true` (by default it is), man pages will also be installed containing the same information, they can be viewed with `man nixvim`. diff --git a/build-docs.sh b/build-docs.sh new file mode 100755 index 00000000..b4130432 --- /dev/null +++ b/build-docs.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env sh + +set -ex + +mkdir -p docs-build +nix build github:nix-community/nixvim#docs +cp -r result/share/doc docs-build +nix build github:nix-community/nixvim/nixos-23.11#docs +cp -r result/share/doc docs-build/stable