blog/.forgejo/workflows/test.yaml
Sergei Poljanski f4c1887a42
All checks were successful
Test / check (push) Successful in 6s
Build and Deploy to Production / check (push) Successful in 6s
Build and Deploy to Production / build (push) Successful in 9s
Build and Deploy to Production / deploy (push) Successful in 27s
Build the site as a Nix package, with a NixOS module to serve it
packages.default is the built site; nixosModules.default (services.blog)
serves it from an nginx virtual host on a port, for Traefik to proxy.
The servers will take it from here instead of the container image. CI
now builds the package, so a change that breaks it never reaches main.

The container deploy stays until the NixOS service has taken over.

Assisted-by: Claude:opus-5-5
2026-11-17 12:17:53 +04:00

28 lines
679 B
YAML

name: Test
on:
push:
branches-ignore:
- main
jobs:
check:
runs-on: nix-latest
# Settings via env, not /etc/nix/nix.conf: in the image that is a
# symlink into /nix/store, which the runner's nix-store volume
# shadows, so it dangles once the image moves on.
env:
NIX_CONFIG: |
experimental-features = nix-command flakes
build-users-group =
sandbox = false
steps:
- name: Prepare container for actions
run: |
nix-env -iA nixpkgs.nodejs_22
- name: Checkout
uses: actions/checkout@v7.0.1
- name: Build site (the package nginx serves)
run: nix build .#default