Skip to content

Commit 0c5915e

Browse files
committed
test: deploy on test branch
1 parent d1cccdf commit 0c5915e

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,32 @@ jobs:
9797
NEXT_PUBLIC_API_URL=https://etu.utt.fr/api
9898
NEXT_PUBLIC_CAS_SERVICE_URL=https://etu.utt.fr/login
9999
tags: |
100-
${{ secrets.REGISTRY_URL }}/etuutt/front:prod
100+
${{ secrets.REGISTRY_URL }}/etuutt/front:prod
101+
102+
deploy-test:
103+
if: ${{ github.event_name != 'pull_request' && (github.ref == 'refs/heads/feat/test-ci') }}
104+
runs-on: self-hosted
105+
needs:
106+
- lint
107+
- build
108+
steps:
109+
- uses: actions/checkout@v4
110+
- name: Install docker
111+
uses: docker/setup-buildx-action@v3
112+
- name: Login to registry
113+
uses: docker/login-action@v3
114+
with:
115+
registry: ${{ secrets.REGISTRY_URL }}
116+
username: ${{ secrets.REGISTRY_USERNAME }}
117+
password: ${{ secrets.REGISTRY_TOKEN }}
118+
- run: cp .env.dist .env.prod
119+
- name: Build and push
120+
uses: docker/build-push-action@v6
121+
with:
122+
push: true
123+
build-args: |
124+
NODE_ENV=production
125+
NEXT_PUBLIC_API_URL=https://etu.utt.fr/api
126+
NEXT_PUBLIC_CAS_SERVICE_URL=https://etu.utt.fr/login
127+
tags: |
128+
${{ secrets.REGISTRY_URL }}/etuutt/front:test

0 commit comments

Comments
 (0)