Skip to content

Commit af1cde1

Browse files
refactor: changes the order of cicd prod and the branch in cicd beta
1 parent 2d18745 commit af1cde1

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

.github/workflows/deploy-beta.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CI/CD OCA
22

33
on:
44
push:
5-
branches: ["refact/update-cicd"]
5+
branches: ["main"]
66

77
jobs:
88
build:

.github/workflows/deploy-oca.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@ jobs:
1010
steps:
1111
- uses: actions/checkout@v4
1212

13-
- name: Stop existing container
14-
run: sudo docker rm -f ${{ vars.CONTAINER_NAME_PROD }} || true
15-
16-
- name: Remove the old image
17-
run: sudo docker rmi ${{ vars.DOCKER_IMAGE_PROD }}:latest || true
18-
1913
- name: Update docker metadata with the tag
2014
uses: docker/metadata-action@v4
2115
id: meta
@@ -47,7 +41,10 @@ jobs:
4741
NEXT_PUBLIC_GA_ID=${{ secrets.NEXT_PUBLIC_GA_ID }}
4842
NEXT_PUBLIC_CONTENTFUL_ACCESS_TOKEN=${{ secrets.NEXT_PUBLIC_CONTENTFUL_ACCESS_TOKEN }}
4943
NEXT_PUBLIC_CONTENTFUL_SPACE=${{ secrets.NEXT_PUBLIC_CONTENTFUL_SPACE }}
50-
44+
45+
- name: Stop existing container
46+
run: sudo docker rm -f ${{ vars.CONTAINER_NAME_PROD }} || true
47+
5148
- name: Run new container
5249
run: sudo docker run --name ${{ vars.CONTAINER_NAME_PROD }} -p ${{ vars.HOST_PORT_PROD }}:${{ vars.CONTAINER_PORT }} -d ${{ vars.DOCKER_IMAGE_PROD }}:latest
5350

0 commit comments

Comments
 (0)