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: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Build & Unit Test
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -27,6 +28,7 @@ jobs:
build-MAUI: build-MAUI:
runs-on: windows-latest runs-on: windows-latest
name: Build MAUI
needs: [build] # for ignoring bad builds needs: [build] # for ignoring bad builds
strategy: strategy:
fail-fast: false fail-fast: false
@ -45,6 +47,7 @@ jobs:
build-Docker: build-Docker:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Build Containers
needs: [build, build-Js] # for ignoring bad builds needs: [build, build-Js] # for ignoring bad builds
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) 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 }} sarsoo/selector-web:${{ github.ref_name }}
file: Dockerfile.Web 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: build-Js:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Build Frontend
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix: