From f3fba04398e873afa6fbaa8bd3bde19f439ab6d2 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Mon, 16 Dec 2024 21:52:56 -0600 Subject: [PATCH] ci: Fix Woodpecker symlink deployment issue Woodpecker wasn't able to deploy, because 'result' from a Nix flake is a symlink to the Nix store, which isn't copied over to a non-Nix deployment container like plugin-codeberg-pages-deploy. Trying to troubleshoot deploy steps in particular is hard because, not only do you not want to have the test stage doing random deployments, but Woodpecker CLI also features a nice bug where the use of `from_secret` actually causes the entire pipeline to not run. Anyway, remove excess permissions that are no longer needed, create a proper copy step, and fix the deployment. --- .woodpecker/build-site.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.woodpecker/build-site.yml b/.woodpecker/build-site.yml index fa525b2..4de02aa 100644 --- a/.woodpecker/build-site.yml +++ b/.woodpecker/build-site.yml @@ -1,17 +1,17 @@ when: - branch: "master" + branch: master + event: push steps: - name: Build site image: nixos/nix:2.24.11 - privileged: true commands: - echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf - - echo 'sandbox = true' >> /etc/nix/nix.conf - nix build + - mkdir public && cp -av result/* public - name: Deploy to pages image: codeberg.org/xfix/plugin-codeberg-pages-deploy:1 settings: - folder: result + folder: public ssh_key: from_secret: ssh_key