workflow
Some checks failed
Deploy / docker (17, 3.8.5) (push) Failing after 50s

This commit is contained in:
Braydon 2024-06-19 22:07:53 -04:00
parent 892ad6a5b0
commit 4331207e6e
3 changed files with 76 additions and 0 deletions

@ -0,0 +1,38 @@
name: Deploy
on:
push:
branches: ["master"]
paths: [".gitea/workflows/deploy-api.yml", "API/**", "!API/README.md"]
jobs:
docker:
strategy:
matrix:
java-version: ["17"]
maven-version: ["3.8.5"]
runs-on: "ubuntu-latest"
defaults:
run:
working-directory: "./API"
# Steps to run
steps:
# Checkout the repo
- name: Checkout
uses: actions/checkout@v4
# Setup Java and Maven
- name: Set up JDK and Maven
uses: s4u/setup-maven-action@v1.12.0
with:
java-version: ${{ matrix.java-version }}
distribution: "zulu"
maven-version: ${{ matrix.maven-version }}
# Deploy to Dokku
- name: Deploy to Dokku
uses: dokku/github-action@master
with:
git_remote_url: "ssh://dokku@10.10.3.28:22/textpurify-api"
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}

@ -0,0 +1,13 @@
package me.braydon.profanity.notification;
/**
* A source that can receive notifications.
*
* @author Braydon
*/
public abstract class NotificationSource {
/**
* Send an alert to this notification source.
*/
public abstract void alert();
}

@ -0,0 +1,25 @@
package me.braydon.profanity.notification.impl;
import lombok.AllArgsConstructor;
import lombok.NonNull;
import me.braydon.profanity.notification.NotificationSource;
/**
* A notification source that
* sends alerts to a Discord webhook.
*
* @author Braydon
*/
@AllArgsConstructor
public final class DiscordSource extends NotificationSource {
/**
* The URL of the webhook to send alerts to.
*/
@NonNull private final String webhookUrl;
/**
* Send an alert to this notification source.
*/
@Override
public void alert() {}
}