This commit is contained in:
30
.gitea/workflows/deploy.yml
Normal file
30
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Build & Deploy Nuxt (Docker)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: [self-hosted, linux, docker]
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Define image tag
|
||||
run: |
|
||||
echo "IMAGE=local/nautilusDesk:${{ gitea.sha }}" >> $GITEA_ENV
|
||||
|
||||
- name: Build image
|
||||
run: |
|
||||
docker build -t "$IMAGE" .
|
||||
|
||||
- name: Deploy via compose
|
||||
run: |
|
||||
cd deploy
|
||||
IMAGE="$IMAGE" docker compose up -d --remove-orphans
|
||||
|
||||
- name: Cleanup dangling images (optional)
|
||||
run: |
|
||||
docker image prune -f || true
|
||||
Reference in New Issue
Block a user