All checks were successful
Deploy / deploy (push) Successful in 11s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
38 lines
908 B
YAML
38 lines
908 B
YAML
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: Write .env
|
|
run: |
|
|
cat > .env << EOF
|
|
OUTLINE_URL=http://172.29.0.7:3000
|
|
OUTLINE_TOKEN=${{ secrets.OUTLINE_TOKEN }}
|
|
TS_AUTHKEY=${{ secrets.TS_AUTHKEY }}
|
|
EOF
|
|
|
|
- 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
|