cdn/.gitlab-ci.yml

39 lines
623 B
YAML
Raw Normal View History

2023-07-10 19:00:00 +02:00
---
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