doing deploy with ts

This commit is contained in:
Andy Pack 2024-07-01 22:01:03 +01:00
parent 3832b05308
commit c6eca36e7d
Signed by: sarsoo
GPG Key ID: A55BA3536A5E0ED7

View File

@ -6,6 +6,7 @@ jobs:
build:
runs-on: ubuntu-latest
name: Build & Unit Test
strategy:
fail-fast: false
matrix:
@ -27,6 +28,7 @@ jobs:
build-MAUI:
runs-on: windows-latest
name: Build MAUI
needs: [build] # for ignoring bad builds
strategy:
fail-fast: false
@ -45,6 +47,7 @@ jobs:
build-Docker:
runs-on: ubuntu-latest
name: Build Containers
needs: [build, build-Js] # for ignoring bad builds
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
@ -78,9 +81,32 @@ jobs:
sarsoo/selector-web:${{ github.ref_name }}
file: Dockerfile.Web
deploy:
runs-on: ubuntu-latest
name: Deploy
needs: [build-Docker] # for ignoring bad builds
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
environment:
name: prod
url: https://selector.sarsoo.xyz
steps:
- uses: actions/checkout@v3
- name: Tailscale
uses: tailscale/github-action@v2
with:
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
tags: tag:ci
- name: Deploy
run: ssh aj@odb -c "cd selector/ && docker compose pull && docker compose up -d"
build-Js:
runs-on: ubuntu-latest
name: Build Frontend
strategy:
fail-fast: false
matrix: