This repository has been archived on 2025-11-16. You can view files and clone it, but cannot push or open issues or pull requests.
Files
swarm-production/.gitea/workflows/deploy.yml
John b0a4f23cad
Some checks failed
Deploy Stack to Swarm / deploy (push) Has been cancelled
2025-11-12 22:40:02 +00:00

32 lines
742 B
YAML

name: Deploy Stack to Swarm
on:
push:
branches:
- main
workflow_dispatch:
# Allows manual triggering
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Validate compose file
run: |
docker compose -f stack.yml config > /dev/null
echo "✅ Compose file is valid"
- name: Deploy to swarm
run: |
echo "🚀 Deploying stack..."
docker stack deploy -c stack.yml ${{ github.event.repository.name }} --prune --with-registry-auth
echo "✅ Stack deployed successfully"
- name: Verify deployment
run: |
sleep 5
docker stack services ${{ github.event.repository.name }}