From 1959734b5616c50364fbe00977cb21c02e4775c9 Mon Sep 17 00:00:00 2001 From: Johnnybegood90 Date: Sat, 14 Mar 2026 03:42:20 +0100 Subject: [PATCH] Add deploy workflow --- .github/workflows/deploy.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..f0971cd --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,32 @@ +name: Deploy GridTV + +on: + push: + branches: + - main + - beta + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Start SSH agent + uses: webfactory/ssh-agent@v0.9.0 + with: + ssh-private-key: ${{ secrets.SSH_KEY }} + + - name: Add server to known_hosts + run: | + mkdir -p ~/.ssh + ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts + + - name: Deploy main + if: github.ref == 'refs/heads/main' + run: | + ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} main + + - name: Deploy beta + if: github.ref == 'refs/heads/beta' + run: | + ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} beta