assa
This commit is contained in:
26
.gitea/workflows/deploy.yaml
Normal file
26
.gitea/workflows/deploy.yaml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
name: Docker Deploy
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build Docker Image
|
||||||
|
run: |
|
||||||
|
docker build -t my-local-app:latest .
|
||||||
|
|
||||||
|
- name: Deploy to CasaOS (Docker)
|
||||||
|
run: |
|
||||||
|
# Stop and remove the old container if it exists
|
||||||
|
docker stop my-running-app || true
|
||||||
|
docker rm my-running-app || true
|
||||||
|
|
||||||
|
# Run the new container
|
||||||
|
docker run -d \
|
||||||
|
--name my-running-app \
|
||||||
|
-p 9002:5005 \
|
||||||
|
--restart always \
|
||||||
|
my-local-app:latest
|
||||||
Reference in New Issue
Block a user