mirror of
https://github.com/lemeow125/Notes.git
synced 2025-04-10 03:51:27 +08:00
44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
steps:
|
|
- name: deploy
|
|
image: node:18-alpine
|
|
environment:
|
|
CLOUDFLARE_ACCOUNT_ID:
|
|
from_secret: CLOUDFLARE_ACCOUNT_ID
|
|
CLOUDFLARE_API_TOKEN:
|
|
from_secret: CLOUDFLARE_API_TOKEN
|
|
commands:
|
|
- npm install --save-dev
|
|
- npm run build
|
|
- npx wrangler pages deploy "./build/" --project-name blog --branch master --commit-dirty
|
|
when:
|
|
- branch: master
|
|
event: push
|
|
- name: mail_success
|
|
image: deblan/woodpecker-email
|
|
settings:
|
|
debug: yes
|
|
dsn: gmail+smtp://username:password@default?verify_peer=1
|
|
from:
|
|
address:
|
|
- from_secret: SMTP_SELFHOSTED_FROM_EMAIL
|
|
name:
|
|
- from_secret: SMTP_EMAIL_NAME
|
|
recipients:
|
|
- from_secret: SMTP_SELFHOSTED_EMAIL_TO_1
|
|
level: success
|
|
recipients_only: true
|
|
content:
|
|
subject: "[{{ pipeline.status }}] {{ repo.full_name }} ({{ commit.branch }} - {{ commit.sha[0:8] }}"
|
|
body: |
|
|
{{ commit.sha }}<br>
|
|
{{ pipeline.status }}<br>
|
|
{{ commit.author_email }}<br>
|
|
attachments:
|
|
- log/*
|
|
when:
|
|
- branch: master
|
|
- status: [success, failure]
|
|
|
|
when:
|
|
- branch: master
|
|
event: push
|