Switch back to old-styled CI/CD configuration
No more Nix :(
This commit is contained in:
parent
8008d1c798
commit
73e5c859f3
|
@ -1,19 +1,37 @@
|
|||
---
|
||||
default:
|
||||
interruptible: true
|
||||
tags:
|
||||
- docker
|
||||
- linux
|
||||
|
||||
stages:
|
||||
- build
|
||||
- deploy
|
||||
|
||||
workflow:
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
|
||||
build:site:
|
||||
stage: build
|
||||
image: alpine:edge
|
||||
script:
|
||||
- echo "https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
|
||||
- apk add --no-cache hugo dart-sass
|
||||
- hugo --gc --panicOnWarning
|
||||
artifacts:
|
||||
expire_in: 1 hour
|
||||
paths:
|
||||
- public/
|
||||
|
||||
deploy:cloudflare_pages:
|
||||
stage: deploy
|
||||
image: nixos/nix:2.18.1
|
||||
variables:
|
||||
NIX_CONFIG: experimental-features = nix-command flakes
|
||||
script:
|
||||
- nix build .
|
||||
- nix run .#publish
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
image: node:21-alpine
|
||||
script: |
|
||||
npx wrangler pages deploy \
|
||||
--project-name=folliehiyuki \
|
||||
--branch="$CI_COMMIT_REF_NAME" \
|
||||
public/
|
||||
dependencies:
|
||||
- build:site
|
||||
|
|
Loading…
Reference in New Issue