mirror of
https://github.com/nix-community/home-manager.git
synced 2024-12-14 11:57:55 +00:00
ci: build manual and push to home-manager.dev
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.
This commit is contained in:
parent
172d46d4b2
commit
0ee5ab611d
1 changed files with 34 additions and 0 deletions
34
.builds/manual.yml
Normal file
34
.builds/manual.yml
Normal file
|
@ -0,0 +1,34 @@
|
|||
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"
|
Loading…
Reference in a new issue