From 6efccf6ece235bb0f793aef54767eee06a472b48 Mon Sep 17 00:00:00 2001 From: noe Date: Wed, 14 May 2025 07:55:40 -0700 Subject: [PATCH] ci! --- .gitignore | 1 + .woodpecker/build-deploy.yaml | 27 ++++++++++++++++ LICENSE | 21 ------------ flake.lock | 61 +++++++++++++++++++++++++++++++++++ flake.nix | 23 +++++++++++++ 5 files changed, 112 insertions(+), 21 deletions(-) create mode 100644 .gitignore create mode 100644 .woodpecker/build-deploy.yaml delete mode 100644 LICENSE create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e2f5dd2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +result \ No newline at end of file diff --git a/.woodpecker/build-deploy.yaml b/.woodpecker/build-deploy.yaml new file mode 100644 index 0000000..ad046f1 --- /dev/null +++ b/.woodpecker/build-deploy.yaml @@ -0,0 +1,27 @@ +when: + - event: push + branch: main + +steps: + - name: build & deploy + image: nixos/nix + # volumes: + # - /nix:/mnt/nix:ro + commands: + - | + echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf + #echo 'store = unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt' >> /etc/nix/nix.conf + + - nix build -L . + + - | + nix-shell -p s3cmd --command 's3cmd \ + --host=static-sites.hoki-porgy.ts.net:9000 \ + --host-bucket=static-sites.hoki-porgy.ts.net:9000 \ + --no-ssl \ + sync result/* s3://noe.sh' + environment: + AWS_ACCESS_KEY_ID: + from_secret: static_sites_client + AWS_SECRET_ACCESS_KEY: + from_secret: static_sites_secret diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 47e5e4d..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 foxxolay - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..ca447d4 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1743550720, + "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c621e8422220273271f52058f618c94e405bb0f5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1746904237, + "narHash": "sha256-3e+AVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d89fc19e405cb2d55ce7cc114356846a0ee5e956", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1743296961, + "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..35804da --- /dev/null +++ b/flake.nix @@ -0,0 +1,23 @@ +{ + description = "https://foxxolay.com"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-parts.url = "github:hercules-ci/flake-parts"; + }; + + outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } { + systems = [ "x86_64-linux" "aarch64-linux" ]; + perSystem = { config, self', pkgs, lib, system, ... }: { + packages.default = pkgs.stdenvNoCC.mkDerivation { + name = "foxxolay.com"; + src = ./.; + installPhase = '' + cp -r . $out/ + cd $out + rm -rf .* *.nix *.lock + ''; + }; + }; + }; +} \ No newline at end of file