2026-05-09 11:33:15 -05:00
|
|
|
when:
|
2026-05-09 11:56:38 -05:00
|
|
|
- event: push
|
|
|
|
|
branch: [main]
|
|
|
|
|
- event: manual
|
2026-05-09 11:33:15 -05:00
|
|
|
|
|
|
|
|
steps:
|
2026-05-09 11:56:38 -05:00
|
|
|
- name: build
|
|
|
|
|
image: node:22
|
2026-05-09 11:33:15 -05:00
|
|
|
commands:
|
|
|
|
|
- npm ci
|
2026-05-09 11:56:38 -05:00
|
|
|
- npm run test
|
2026-05-12 14:48:19 -05:00
|
|
|
- npm run build
|
2026-05-09 11:33:15 -05:00
|
|
|
|
2026-05-09 11:56:38 -05:00
|
|
|
- name: deploy
|
|
|
|
|
image: node:22
|
|
|
|
|
environment:
|
|
|
|
|
CLOUDFLARE_API_TOKEN:
|
|
|
|
|
from_secret: cloudflare_api_token
|
|
|
|
|
CLOUDFLARE_ACCOUNT_ID:
|
|
|
|
|
from_secret: cloudflare_account_id
|
2026-05-09 11:33:15 -05:00
|
|
|
commands:
|
2026-05-09 11:56:38 -05:00
|
|
|
- npx wrangler pages deploy ./dist --project-name halfstreet-io --branch $CI_COMMIT_BRANCH
|
2026-05-09 11:33:15 -05:00
|
|
|
|
2026-05-09 11:56:38 -05:00
|
|
|
- name: notify-success
|
|
|
|
|
image: curlimages/curl:latest
|
|
|
|
|
environment:
|
|
|
|
|
PUSHOVER_TOKEN:
|
|
|
|
|
from_secret: pushover_token
|
|
|
|
|
PUSHOVER_USER:
|
|
|
|
|
from_secret: pushover_user
|
2026-05-09 11:33:15 -05:00
|
|
|
commands:
|
2026-05-09 11:56:38 -05:00
|
|
|
- |
|
|
|
|
|
curl -sS --fail-with-body \
|
|
|
|
|
--form-string "token=$PUSHOVER_TOKEN" \
|
|
|
|
|
--form-string "user=$PUSHOVER_USER" \
|
|
|
|
|
--form-string "title=halfstreet.io deployed" \
|
|
|
|
|
--form-string "message=Build $CI_PIPELINE_NUMBER succeeded on $CI_COMMIT_BRANCH — $CI_COMMIT_MESSAGE" \
|
|
|
|
|
--form-string "priority=0" \
|
|
|
|
|
--form-string "url=$CI_PIPELINE_URL" \
|
|
|
|
|
--form-string "url_title=View build" \
|
|
|
|
|
https://api.pushover.net/1/messages.json
|
|
|
|
|
when:
|
|
|
|
|
- status: success
|
2026-05-09 11:47:50 -05:00
|
|
|
|
2026-05-09 11:56:38 -05:00
|
|
|
- name: notify-failure
|
2026-05-09 11:47:50 -05:00
|
|
|
image: curlimages/curl:latest
|
|
|
|
|
environment:
|
|
|
|
|
PUSHOVER_TOKEN:
|
|
|
|
|
from_secret: pushover_token
|
|
|
|
|
PUSHOVER_USER:
|
|
|
|
|
from_secret: pushover_user
|
|
|
|
|
commands:
|
|
|
|
|
- |
|
2026-05-09 11:56:38 -05:00
|
|
|
curl -sS --fail-with-body \
|
2026-05-09 11:47:50 -05:00
|
|
|
--form-string "token=$PUSHOVER_TOKEN" \
|
|
|
|
|
--form-string "user=$PUSHOVER_USER" \
|
2026-05-09 11:56:38 -05:00
|
|
|
--form-string "title=halfstreet.io build failed" \
|
|
|
|
|
--form-string "message=Build $CI_PIPELINE_NUMBER failed on $CI_COMMIT_BRANCH — $CI_COMMIT_MESSAGE" \
|
|
|
|
|
--form-string "priority=1" \
|
2026-05-09 11:47:50 -05:00
|
|
|
--form-string "url=$CI_PIPELINE_URL" \
|
2026-05-09 11:56:38 -05:00
|
|
|
--form-string "url_title=View build" \
|
2026-05-09 11:47:50 -05:00
|
|
|
https://api.pushover.net/1/messages.json
|
|
|
|
|
when:
|
2026-05-09 11:56:38 -05:00
|
|
|
- status: failure
|