feat: Deploy to S3
All checks were successful
build site / build_site (push) Successful in 1m46s

This commit is contained in:
sinavir 2024-12-17 21:55:42 +01:00
parent 2d0abde6af
commit ba0536df61
No known key found for this signature in database
2 changed files with 45 additions and 20 deletions

View 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 }}

View file

@ -51,18 +51,19 @@ let
]); ]);
in in
{ pkgs.stdenv.mkDerivation {
name = "dgnum-landing";
version = "1.0.1";
src = ./src;
passthru = {
devShell = pkgs.mkShell { devShell = pkgs.mkShell {
packages = [ packages = [
(pkgs.callPackage "${sources.lon}/nix/packages/lon.nix" { }) (pkgs.callPackage "${sources.lon}/nix/packages/lon.nix" { })
python3 python3
]; ];
}; };
};
package = pkgs.stdenv.mkDerivation {
name = "dgnum-landing";
version = "1.0.1";
src = ./src;
buildInputs = [ python3 ]; buildInputs = [ python3 ];
@ -75,5 +76,4 @@ in
buildPhase = '' buildPhase = ''
python3 build.py python3 build.py
''; '';
};
} }