65 lines
1.8 KiB
YAML
65 lines
1.8 KiB
YAML
name: Deploy
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- release
|
|
# tags:
|
|
# - "v[0-9]+.[0-9]+.[0-9]+"
|
|
#
|
|
paths:
|
|
- ".gitea/workflows/deploy-client.yml"
|
|
- "client/**"
|
|
|
|
jobs:
|
|
publish-tauri:
|
|
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
|
|
run: docker build -t chad-client -f ./client/Dockerfile.windows ./client --build-arg COMMIT_SHA=${{ gitea.sha }} --build-arg API_BASE_URL=${{ vars.API_BASE_URL }}
|
|
|
|
publish-web:
|
|
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
|
|
run: docker build -t chad-client -f ./client/Dockerfile.web ./client --build-arg COMMIT_SHA=${{ gitea.sha }} --build-arg API_BASE_URL=${{ vars.API_BASE_URL }}
|
|
|
|
- name: Stop old container
|
|
run: docker rm -f chad-client || true
|
|
|
|
- name: Run
|
|
run: |
|
|
docker run -d \
|
|
--name chad-client \
|
|
--network traefik \
|
|
--label "traefik.enable=true" \
|
|
--label "traefik.http.routers.chad-client.rule=Host(\`chad.koptilnya.xyz\`)" \
|
|
--label "traefik.http.routers.chad-client.entrypoints=websecure" \
|
|
--label "traefik.http.routers.chad-client.tls.certresolver=myresolver" \
|
|
--label "traefik.http.services.chad-client.loadbalancer.server.port=80" \
|
|
chad-client:latest
|