Use Woodpecker and Cloudflare Wrangler for deployments

This commit is contained in:
Keannu Bernasol 2024-10-17 16:06:50 +08:00
parent 967c3545a6
commit abc8d0522f

18
.woodpecker/.deploy.yml Normal file
View file

@ -0,0 +1,18 @@
# .woodpecker.yml
steps:
- name: build & copy
image: node:18-alpine
when:
- branch: master
event: push
environment:
CF_ACCOUNT_ID:
from_secret: CF_ACCOUNT_ID
CF_API_TOKEN:
from_secret: CF_API_TOKEN
commands:
- npm install
- npm run build
- npm install --global wrangler
- npx wrangler pages deploy "./build/" --project-name blog --branch master --commit-dirty
secrets: [CF_ACCOUNT_ID, CF_API_TOKEN]