Commit 263e232f authored by Ben Gamari's avatar Ben Gamari 🐢

Fix deployment

parent bbe543ed
Pipeline #3843 failed with stages
in 21 minutes and 48 seconds
......@@ -5,3 +5,6 @@ dist
dist-newstyle
.ghc.environment.*
result*
# For CI
store.nar
......@@ -58,11 +58,32 @@ deploy:
tags:
- x86_64-linux
only:
variables:
- $DEPLOY_KEY
- master
script:
- mkdir -p .public
- cp -R _site/* public
- mv .public public
artifacts:
paths:
- public
deploy-webhost:
stage: deploy
dependencies:
- build
tags:
- x86_64-linux
only:
- master
environment:
name: haskell.org
url: https://haskell.org/ghc
script:
- echo "Deploying to haskell.org"
- mkdir -p $HOME/.ssh
- echo "$DEPLOY_KEY" > key
- rsync -rv -e "ssh -i ./key" _site/ ghc@webhost.haskell.org:/www-data/haskell.org/ghc
- echo "webhost.haskell.org ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBH2qKrYfhGC/7W/yLGjIkUPozDU+bJSNDFSrilUwyu8H5hbfSnlsBd/HvXvNc3TquDJ1T91J65AjGq+J+2F28Nw=" > $HOME/.ssh/known_hosts
- chown -R 0600 $HOME/.ssh key
- nix run -f . -c scp -r -i key _site/* ghc-site@webhost.haskell.org:/www-data/haskell.org/ghc
after_script:
- rm -f ./key
- rm -f key
{ nixpkgs ? (import <nixpkgs> {}) }:
{ nixpkgs ? (import ./nixpkgs.nix {}) }:
with nixpkgs;
let
......@@ -8,7 +8,7 @@ let
name = "ghc-homepage-scripts";
buildInputs = [ linkchecker ];
nativeBuildInputs = [ makeWrapper ];
src = ./.;
src = nix-gitignore.gitignoreSource [] ./.;
installPhase = ''
mkdir -p $out/bin
substitute check.sh $out/bin/check.sh --replace linkchecker ${linkchecker}/bin/linkchecker
......@@ -19,4 +19,4 @@ let
'';
};
in buildEnv { name = "ghc-homepage-utils"; paths = [ scripts ]; }
in buildEnv { name = "ghc-homepage-utils"; paths = [ scripts rsync openssh ]; }
let
rev = "1222e289b5014d17884a8b1c99f220c5e3df0b14";
src = fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
sha256 = "1sa2m8kdak6y9183jgizg95swrv9ich05lsnli0bdc8r11wahl54";
};
in
import src
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment