Some checks failed
Deploy with Docker Compose / deploy (push) Failing after 1s
Mount the deploy directory at the same absolute path in the runner container so docker compose bind mounts resolve correctly on the host Docker daemon. Add git safe.directory config to avoid ownership errors when the runner (root) operates on host-owned files. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
25 lines
707 B
YAML
25 lines
707 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
|
|
run: |
|
|
git config --global --add safe.directory /home/adamf/deploy/web_server
|
|
git pull gitea main
|
|
|
|
- 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
|