Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
29
.gitea/workflows/deploy.yml
Normal file
29
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
COMPOSE_PROJECT: outline-sync
|
||||
COMPOSE_FILE: docker-compose.yml
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Deploy with docker compose
|
||||
run: |
|
||||
echo "=== Deploying commit ${{ gitea.sha }} to ${{ gitea.ref_name }} ==="
|
||||
docker compose -f "$COMPOSE_FILE" -p "$COMPOSE_PROJECT" up --build -d --remove-orphans
|
||||
|
||||
- name: Prune dangling images
|
||||
run: docker image prune -f
|
||||
|
||||
- name: Show running containers
|
||||
run: docker compose -f "$COMPOSE_FILE" -p "$COMPOSE_PROJECT" ps
|
||||
Reference in New Issue
Block a user