This commit is contained in:
25
.gitea/workflows/build.yml
Normal file
25
.gitea/workflows/build.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
name: Build and Deploy
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
pull_request:
|
||||
branches: [main, master]
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest # Runner must have Docker socket mounted
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: "npm"
|
||||
- run: npm ci && npm run build
|
||||
|
||||
- name: Build and run container
|
||||
run: |
|
||||
docker build -t garcia-inv:latest .
|
||||
docker stop garcia-inv 2>/dev/null || true
|
||||
docker rm garcia-inv 2>/dev/null || true
|
||||
docker run -d --name garcia-inv -p 30001:80 --restart unless-stopped \
|
||||
garcia-inv:latest
|
||||
Reference in New Issue
Block a user