53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
name: test-build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-js
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Set up pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 10.x
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 24.11.0
|
|
cache: pnpm
|
|
|
|
- name: Install Dependencies
|
|
run: pnpm install
|
|
|
|
- name: Lint Code
|
|
run: pnpm lint
|
|
|
|
- name: Build Project
|
|
run: pnpm build
|
|
|
|
- name: ntfy Failed
|
|
uses: niniyas/ntfy-action@master
|
|
if: failure()
|
|
with:
|
|
url: '${{ secrets.NTFY_URL }}'
|
|
topic: '${{ secrets.NTFY_TOPIC }}'
|
|
title: 'Test Failure - Site Profile'
|
|
priority: 4
|
|
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
|
tags: action,failed
|
|
details: 'Tests have failed for building Site Profile'
|
|
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
|
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/site-profile/actions?workflow=test-build.yaml", "clear": true}]'
|
|
image: true
|