File tree 2 files changed +36
-10
lines changed
2 files changed +36
-10
lines changed Original file line number Diff line number Diff line change
1
+ name : Updload Docs
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+
8
+ env :
9
+ GH_TOKEN : ${{ github.token }}
10
+
11
+ jobs :
12
+ wait-for-hydra :
13
+ runs-on : ubuntu-latest
14
+
15
+ steps :
16
+ - name : Checkout
17
+ uses : actions/checkout@v4
18
+
19
+ - name : Install Nix with good defaults
20
+ uses : input-output-hk/install-nix-action@v20
21
+ with :
22
+ extra_nix_config : |
23
+ trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk=
24
+ substituters = https://cache.nixos.org/ https://cache.iog.io/ https://cache.zw3rk.com
25
+ nix_path : nixpkgs=channel:nixos-unstable
26
+
27
+ - name : Update docs
28
+ run : |
29
+ nix-build build.nix -A maintainer-scripts.update-docs -o update-docs.sh
30
+ ./update-docs.sh
31
+
32
+ - name : Upload docs
33
+ run : |
34
+ git config --global user.name 'Auto Update Bot'
35
+ git config --global user.email '[email protected] '
36
+ git push origin gh-pages
Original file line number Diff line number Diff line change 3
3
4
4
with lib ;
5
5
6
- let
7
- repo = "[email protected] :input-output-hk/haskell.nix.git" ;
8
- sshKey = "/run/keys/buildkite-haskell-dot-nix-ssh-private" ;
9
- in
10
6
# update-docs depends on glibc which doesn't build on darwin
11
7
meta . addMetaAttrs { platforms = platforms . linux ; } ( writeScript "update-docs.sh" ''
12
8
#!${ stdenv . shell }
37
33
check_staged
38
34
echo "Committing changes..."
39
35
git commit --no-gpg-sign --message "Update gh-pages for $rev"
40
-
41
- use_ssh_key ${ sshKey }
42
-
43
- if [ "'' ${GITHUB_REF:-}" = refs/heads/master ]; then
44
- git push ${ repo } HEAD:gh-pages
45
- fi
46
36
'' )
You can’t perform that action at this time.
0 commit comments