49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
kind: pipeline
|
|
type: docker
|
|
name: default
|
|
|
|
environment:
|
|
NIX: nix --extra-experimental-features nix-command --extra-experimental-features flakes --extra-experimental-features ca-derivations"
|
|
CACHE_NAME: mat
|
|
|
|
steps:
|
|
- name: set up cachix
|
|
image: nixos/nix
|
|
environment:
|
|
CACHIX_AUTH_TOKEN:
|
|
from_secret: cachix_auth_token
|
|
commands:
|
|
- echo $NIX
|
|
- $NIX profile install nixpkgs#cachix
|
|
- cachix use $CACHE_NAME
|
|
- name: nix build
|
|
image: nixos/nix
|
|
volumes:
|
|
- name: site
|
|
path: /site
|
|
commands:
|
|
- >
|
|
$NIX flake archive --json \
|
|
| jq -r '.path,(.inputs|to_entries[].value.path)' \
|
|
| cachix push $CACHE_NAME
|
|
- >
|
|
$NIX build \
|
|
| jq -r '.[].outputs | to_entries[].value' \
|
|
| cachix push $CACHE_NAME
|
|
- cp -r result/* /site/
|
|
|
|
- name: netlify deploy
|
|
image: lucap/drone-netlify
|
|
volumes:
|
|
- name: site
|
|
path: /site
|
|
settings:
|
|
token:
|
|
from_secret: netlify_token
|
|
site_id:
|
|
from_secret: netlify_site_id
|
|
path: /site
|
|
|
|
volumes:
|
|
- name: site
|
|
temp: {} |