ci: Fix Woodpecker symlink deployment issue
All checks were successful
ci/woodpecker/push/build-site Pipeline was successful

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.
This commit is contained in:
Thomas A. Christensen II 2024-12-16 21:52:56 -06:00
parent f3391badf4
commit f3fba04398
Signed by: millironx
GPG key ID: 19A2EF3A3C0C18A9

View file

@ -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