This commit is contained in:
parent
2d0abde6af
commit
ba0536df61
2 changed files with 45 additions and 20 deletions
25
.forgejo/workflows/build.yaml
Normal file
25
.forgejo/workflows/build.yaml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
name: build configuration
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: nix
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: nix-build
|
||||||
|
|
||||||
|
- name: deploy
|
||||||
|
run: nix-shell -p awscli2 --run "aws s3 sync ./result/ s3://$BUCKET/ --delete --endpoint-url $URL"
|
||||||
|
env:
|
||||||
|
URL: "https://s3.dgnum.eu/"
|
||||||
|
BUCKET: pub.dgnum.eu
|
||||||
|
AWS_ACCESS_KEY_ID: ${{ secrets.KEY_ID }}
|
||||||
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_KEY }}
|
||||||
|
|
||||||
|
|
||||||
|
|
40
default.nix
40
default.nix
|
@ -51,29 +51,29 @@ let
|
||||||
]);
|
]);
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
pkgs.stdenv.mkDerivation {
|
||||||
devShell = pkgs.mkShell {
|
name = "dgnum-landing";
|
||||||
packages = [
|
version = "1.0.1";
|
||||||
(pkgs.callPackage "${sources.lon}/nix/packages/lon.nix" { })
|
src = ./src;
|
||||||
python3
|
|
||||||
];
|
passthru = {
|
||||||
|
devShell = pkgs.mkShell {
|
||||||
|
packages = [
|
||||||
|
(pkgs.callPackage "${sources.lon}/nix/packages/lon.nix" { })
|
||||||
|
python3
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
package = pkgs.stdenv.mkDerivation {
|
buildInputs = [ python3 ];
|
||||||
name = "dgnum-landing";
|
|
||||||
version = "1.0.1";
|
|
||||||
src = ./src;
|
|
||||||
|
|
||||||
buildInputs = [ python3 ];
|
env.DATA_FILE = pkgs.writers.writeJSON "data.json" { inherit description links; };
|
||||||
|
|
||||||
env.DATA_FILE = pkgs.writers.writeJSON "data.json" { inherit description links; };
|
configurePhase = ''
|
||||||
|
export BUILD_DIR=$out
|
||||||
|
'';
|
||||||
|
|
||||||
configurePhase = ''
|
buildPhase = ''
|
||||||
export BUILD_DIR=$out
|
python3 build.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
python3 build.py
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue