mirror of
https://github.com/nix-community/home-manager
synced 2024-11-16 08:09:45 +01:00
6ca1e16eb3
This builds the manual on builds.sr.ht and pushes it for availability
on
https://home-manager.dev/manual/unstable or
https://home-manager.dev/manual/{version}
depending on which release branch is built.
(cherry picked from commit 0ee5ab611d
)
34 lines
1 KiB
YAML
34 lines
1 KiB
YAML
image: nixos/unstable
|
|
sources:
|
|
- https://git.sr.ht/~rycee/home-manager
|
|
secrets:
|
|
- 01ad357c-3214-4f73-bb7e-2441e440cc51
|
|
- 7d16ccc0-1c4f-4fd6-91c1-c54fc0f5807f
|
|
- bd5f26ee-78b8-4a6f-9d68-8d8f53a068f1
|
|
environment:
|
|
NIX_CONFIG: "experimental-features = nix-command flakes"
|
|
packages:
|
|
- nixos.cachix
|
|
tasks:
|
|
- setup: |
|
|
cachix use rycee
|
|
- build: |
|
|
cd ./home-manager
|
|
gitBranch="$(git show -s --pretty=%D HEAD | sed '{ s/.*, //; s!origin/!!; }')"
|
|
[[ $gitBranch == master || $gitBranch == release-??.?? ]] || exit 0
|
|
nix build -L .#docs-html
|
|
cachix push rycee ./result
|
|
- deploy: |
|
|
cd ./home-manager
|
|
gitBranch="$(git show -s --pretty=%D HEAD | sed '{ s/.*, //; s!origin/!!; }')"
|
|
[[ $gitBranch == master || $gitBranch == release-??.?? ]] || exit 0
|
|
|
|
if [[ $gitBranch == master ]]; then
|
|
dirName="unstable"
|
|
else
|
|
dirName="$(cat .release)"
|
|
fi
|
|
|
|
rsync --delete -r --info=stats \
|
|
"result/share/doc/home-manager/" \
|
|
"hm-web:/srv/www/home-manager.dev/manual/$dirName"
|