All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 48s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
28 lines
882 B
YAML
28 lines
882 B
YAML
name: Deploy with Docker Compose
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Pull changes
|
|
working-directory: /home/adamf/deploy/web_server
|
|
env:
|
|
GIT_SSH_COMMAND: "ssh -o StrictHostKeyChecking=no"
|
|
run: |
|
|
git config --global --add safe.directory /home/adamf/deploy/web_server
|
|
git fetch ssh://git@localhost:2222/adamf/web_server.git main
|
|
git reset --hard FETCH_HEAD
|
|
|
|
- name: Run docker compose up
|
|
working-directory: /home/adamf/deploy/web_server
|
|
env:
|
|
DOCKER_API_VERSION: "1.41"
|
|
run: docker compose up -d --build --remove-orphans
|
|
|
|
- name: Prune unused Docker resources
|
|
run: docker image prune -f
|