6 ms·
This is my entire CI yaml, which copies static HTML and other files (I don't use any static site generator, just plain HTML & CSS) and flushes the Cloudflare ca
by orisho 6y ago
This is my entire CI yaml, which copies static HTML and other files (I don't use any static site generator, just plain HTML & CSS) and flushes the Cloudflare cache:
stages:
- deploy
- clear-cache
pages:
stage: deploy
script:
- mkdir .public
- cp -r * .public
- mv .public public
artifacts:
paths:
- public
only:
- master
clear-cache:
stage: clear-cache
script:
- curl -X DELETE "https://api.cloudflare.com/client/v4/zones/$CF_ZONE_ID/purge_cache" -H "X-Auth-Key:$CF_AUTH_KEY" -H "X-Auth-Email:$CF_AUTH_EMAIL" -H "Content-Type:application/json" --data '{"purge_everything":true}'
only:
- master