From c6eca36e7dabec39ea8ca679ae548fc180457923 Mon Sep 17 00:00:00 2001 From: Andy Pack Date: Mon, 1 Jul 2024 22:01:03 +0100 Subject: [PATCH] doing deploy with ts --- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4664850..c00528f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: