45 lines
1013 B
YAML
45 lines
1013 B
YAML
kind: pipeline
|
|
type: docker
|
|
name: default
|
|
|
|
environment:
|
|
NIX: nix --extra-experimental-features nix-command --extra-experimental-features flakes
|
|
CACHE_NAME: mat
|
|
|
|
steps:
|
|
- name: nix build
|
|
image: nixos/nix
|
|
volumes:
|
|
- name: site
|
|
path: /site
|
|
environment:
|
|
CACHIX_AUTH_TOKEN:
|
|
from_secret: cachix_auth_token
|
|
commands:
|
|
- nix-env --install --attribute nixpkgs.cachix nixpkgs.jq
|
|
- cachix use $CACHE_NAME
|
|
- >
|
|
$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: {} |