From 17c7d889aff0f14819e99d7fab68826eb8dd5dc5 Mon Sep 17 00:00:00 2001 From: alina sireneva Date: Sun, 4 Aug 2024 01:56:50 +0300 Subject: [PATCH] ci: deploy with desu-deploy --- .github/workflows/publish.yaml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 2f03663..18204e1 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -1,11 +1,17 @@ -name: Release - Tag and publish Docker image +name: Publish and deploy on: push: branches: [ main ] + workflow_dispatch: + +concurrency: + group: deploy + cancel-in-progress: true jobs: - create_release: + publish: + if: github.repository == 'teidesu/tei.su' # do not run on forks runs-on: ubuntu-latest permissions: contents: write @@ -46,4 +52,15 @@ jobs: push: true platforms: linux/amd64,linux/arm64 tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file + labels: ${{ steps.meta.outputs.labels }} + + deploy: + runs-on: ubuntu-latest + needs: publish + steps: + - uses: teidesu/desu-deploy@main + with: + key: ${{ secrets.DEPLOY_KEY }} + server: ${{ secrets.DEPLOY_SERVER }} + wireguard: ${{ secrets.DEPLOY_WG }} + service: teisu \ No newline at end of file