This commit is contained in:
25
.gitea/workflows/docker.yml
Normal file
25
.gitea/workflows/docker.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
name: Angular Docker CI/CD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: self-hosted
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t front-fiscad .
|
||||
|
||||
- name: Stop old container
|
||||
run: |
|
||||
docker stop front-fiscad || true
|
||||
docker rmi front-fiscad || true
|
||||
|
||||
- name: Run new container
|
||||
run: |
|
||||
docker run -d -p 8383:80 --name front-fiscad front-fiscad
|
||||
Reference in New Issue
Block a user