38 lines
623 B
YAML
38 lines
623 B
YAML
---
|
|
default:
|
|
interruptible: true
|
|
tags:
|
|
- docker
|
|
- linux
|
|
|
|
workflow:
|
|
rules:
|
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
|
|
stages:
|
|
- build
|
|
- deploy
|
|
|
|
build:generate_html:
|
|
stage: build
|
|
artifacts:
|
|
expire_in: 1 hour
|
|
paths:
|
|
- out/
|
|
image: golang:1.20-alpine
|
|
script:
|
|
- apk --no-cache add minify make
|
|
- make
|
|
|
|
deploy:cloudflare_pages:
|
|
stage: deploy
|
|
image:
|
|
name: node:20-alpine
|
|
entrypoint: ['']
|
|
script: |
|
|
npx wrangler pages deploy \
|
|
--project-name=folliehiyuki-cdn \
|
|
--branch="$CI_COMMIT_REF_NAME" \
|
|
out/
|
|
dependencies:
|
|
- build:generate_html
|