added deploy-prod.yml
This commit is contained in:
28
.gitea/workflows/deploy-prod.yml
Normal file
28
.gitea/workflows/deploy-prod.yml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
name: deploy-frontend-prod
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags: ['v*']
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: prod
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Build image
|
||||||
|
env:
|
||||||
|
GEOCODER_KEY: ${{ secrets.REACT_APP_YANDEX_GEOCODER_KEY }}
|
||||||
|
MAPS_KEY: ${{ secrets.REACT_APP_YANDEX_MAPS_KEY }}
|
||||||
|
SUGGEST_KEY: ${{ secrets.REACT_APP_YANDEX_SUGGEST_KEY }}
|
||||||
|
run: |
|
||||||
|
docker build \
|
||||||
|
--build-arg REACT_APP_API_URL=https://app.nahodka-app.online \
|
||||||
|
--build-arg REACT_APP_YANDEX_GEOCODER_KEY="$GEOCODER_KEY" \
|
||||||
|
--build-arg REACT_APP_YANDEX_MAPS_KEY="$MAPS_KEY" \
|
||||||
|
--build-arg REACT_APP_YANDEX_SUGGEST_KEY="$SUGGEST_KEY" \
|
||||||
|
--build-arg REACT_APP_WS_ERROR_QUEUE=true \
|
||||||
|
-t nakhodka-frontend:latest \
|
||||||
|
-t nakhodka-frontend:${{ github.ref_name }} .
|
||||||
|
- name: Restart frontend
|
||||||
|
run: docker compose -f /opt/nakhodka/docker-compose.yml up -d frontend
|
||||||
|
- name: Cleanup
|
||||||
|
run: docker image prune -f
|
||||||
Reference in New Issue
Block a user