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 5a495cb8ee
Some checks failed
Deploy All Stacks to Swarm / deploy (push) Has been cancelled
Add deployment workflow
2025-11-12 22:55:10 +00:00

44 lines
1.2 KiB
YAML

name: Deploy All Stacks to Swarm
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Deploy remaining stacks
run: |
for stack_file in *-stack.yml; do
stack_name="${stack_file%-stack.yml}"
# Skip traefik, git-runner (deploy those manually)
if [[ "$stack_name" != "traefik" && "$stack_name" != "git-runner" ]]; then
echo "🚀 Deploying ${stack_name}..."
docker stack deploy -c "$stack_file" "$stack_name" --prune --with-registry-auth
fi
done
- name: Deploy remaining stacks
run: |
for stack_file in *-stack.yml; do
stack_name="${stack_file%-stack.yml}"
# Skip if already deployed
if [[ "$stack_name" != "traefik" && "$stack_name" != "git-runner" ]]; then
echo "🚀 Deploying ${stack_name}..."
docker stack deploy -c "$stack_file" "$stack_name" --prune --with-registry-auth
fi
done
- name: List deployed stacks
run: |
echo ""
echo "📋 All deployed stacks:"
docker stack ls