75 lines
2.0 KiB
YAML
75 lines
2.0 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-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 ./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
|
|
|
|
publish-tauri:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: setup node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: lts/*
|
|
|
|
- name: install Rust stable
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: install frontend dependencies
|
|
run: yarn install
|
|
|
|
- uses: tauri-apps/tauri-action@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
|
with:
|
|
tagName: app-v__VERSION__
|
|
releaseName: "App v__VERSION__"
|
|
releaseBody: "See the assets to download this version and install."
|
|
releaseDraft: true
|
|
projectPath: "./client"
|
|
githubBaseUrl: "https://git.koptilnya.xyz/api/v1"
|
|
isGitea: true
|
|
prerelease: false
|