Initial commit for Gitea Workflows
This commit is contained in:
41
.gitea/workflows/deploy.yaml
Normal file
41
.gitea/workflows/deploy.yaml
Normal file
@@ -0,0 +1,41 @@
|
||||
name: Deploy to Nomad
|
||||
run-name: Deploy ${{ inputs.stack_name }} 🚀
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
stack_name:
|
||||
description: 'Stack to deploy'
|
||||
required: true
|
||||
default: 'ai-backend'
|
||||
type: choice
|
||||
options:
|
||||
- ai-backend
|
||||
- ai-frontend
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Nomad
|
||||
uses: hashicorp/setup-nomad@v3
|
||||
with:
|
||||
version: '1.9.2'
|
||||
|
||||
- name: Run Deploy
|
||||
env:
|
||||
NOMAD_ADDR: "http://192.168.1.133:4646"
|
||||
run: |
|
||||
echo "Deploying ${{ inputs.stack_name }}..."
|
||||
|
||||
# --- AI STACK ---
|
||||
if [ "${{ inputs.stack_name }}" == "ai-backend" ]; then
|
||||
nomad job run stacks/ai/ai-backend.nomad
|
||||
fi
|
||||
|
||||
if [ "${{ inputs.stack_name }}" == "ai-frontend" ]; then
|
||||
nomad job run stacks/ai/ai-frontend.nomad
|
||||
fi
|
||||
Reference in New Issue
Block a user