Add Docker build and deploy pipeline
Some checks failed
deploy-frontend / deploy (push) Failing after 11s
Some checks failed
deploy-frontend / deploy (push) Failing after 11s
This commit is contained in:
24
.gitea/workflows/deploy.yml
Normal file
24
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
name: deploy-frontend
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: host
|
||||
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 }}
|
||||
run: |
|
||||
docker build \
|
||||
--build-arg REACT_APP_YANDEX_GEOCODER_KEY="$GEOCODER_KEY" \
|
||||
--build-arg REACT_APP_YANDEX_MAPS_KEY="$MAPS_KEY" \
|
||||
-t nakhodka-frontend:latest \
|
||||
-t nakhodka-frontend:${{ github.sha }} .
|
||||
- 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