Add .gitea/workflows/build-deploy.yaml
Docker Build and Deploy / build-and-deploy (push) Failing after 15m15s
Docker Build and Deploy / build-and-deploy (push) Failing after 15m15s
This commit is contained in:
@@ -0,0 +1,37 @@
|
|||||||
|
name: Docker Build and Deploy
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Create dockerignore dynamically
|
||||||
|
run: |
|
||||||
|
cat << 'EOF' > .dockerignore
|
||||||
|
node_modules
|
||||||
|
dist
|
||||||
|
.git
|
||||||
|
EOF
|
||||||
|
|
||||||
|
- name: Build Docker Image
|
||||||
|
run: |
|
||||||
|
docker build --no-cache -t housekeeping-web:latest .
|
||||||
|
|
||||||
|
- name: Reštart kontajnera v Portaineri
|
||||||
|
run: |
|
||||||
|
docker stop housekeeping_web || true
|
||||||
|
docker rm housekeeping_web || true
|
||||||
|
|
||||||
|
docker run -d \
|
||||||
|
--name housekeeping_web \
|
||||||
|
--restart always \
|
||||||
|
-p 8085:80 \
|
||||||
|
housekeeping-web:latest
|
||||||
Reference in New Issue
Block a user