chore: deploy to cloudflare pages (#3)
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing

Reviewed-on: https://code.harton.nz/james/website/pulls/3
Co-authored-by: James Harton <james@harton.nz>
Co-committed-by: James Harton <james@harton.nz>
This commit is contained in:
James Harton 2024-02-05 12:56:59 +13:00 committed by james
parent d396f3a4a5
commit aeec21ad48

View file

@ -71,20 +71,17 @@ steps:
- asdf zola build
- name: publish
image: minio/mc
image: node:latest
when:
branch:
- main
event:
- push
environment:
S3_ENDPOINT:
from_secret: S3_ENDPOINT
ACCESS_KEY:
from_secret: ACCESS_KEY_ID
SECRET_KEY:
from_secret: SECRET_ACCESS_KEY
CLOUDFLARE_ACCOUNT_ID:
from_secret: CLOUDFLARE_ACCOUNT_ID
CLOUDFLARE_API_TOKEN:
from_secret: CLOUDFLARE_API_TOKEN
commands:
- mc alias set store $${S3_ENDPOINT} $${ACCESS_KEY} $${SECRET_KEY}
- mc mb -p store/www.harton.nz
- mc anonymous set download store/www.harton.nz
- mc mirror --overwrite public/ store/www.harton.nz/
- npx wrangler pages deploy public --project-name=wwwhartonnz --commit-dirty