Files
tmc-test-task/.gitea/workflows/deploy-frontend.yml
Oscar 8c59c2be32
All checks were successful
Deploy Backend / deploy (push) Successful in 20s
Deploy Frontend / deploy (push) Successful in 1m42s
upd
2026-06-04 15:24:58 +03:00

48 lines
1.3 KiB
YAML

name: Deploy Frontend
on:
push:
branches:
- main
paths:
- '.gitea/workflows/deploy-frontend.yml'
- 'frontend/**'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Keyscan
run: |
ssh-keyscan git.koptilnya.xyz >> ~/.ssh/known_hosts
- name: Checkout
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
ssh-strict: false
persist-credentials: false
- name: Build image
run: |
docker build \
--build-arg API_BASE=${{ vars.API_BASE_URL }} \
-t tmc-frontend ./frontend
- name: Stop old container
run: docker rm -f tmc-frontend || true
- name: Run
run: |
docker run -d \
--name tmc-frontend \
--network traefik \
--label "traefik.enable=true" \
--label "traefik.http.routers.chad-client.rule=Host(\`test-1.koptilnya.xyz\`)" \
--label "traefik.http.routers.tmc-frontend.entrypoints=websecure" \
--label "traefik.http.routers.tmc-frontend.tls=true" \
--label "traefik.http.routers.tmc-frontend.tls.certresolver=myresolver" \
--label "traefik.http.services.tmc-frontend.loadbalancer.server.port=80" \
tmc-frontend:latest