From 2910db9742d5e3e3458e173968a9efeb0d02a56a Mon Sep 17 00:00:00 2001 From: altf4arnold Date: Fri, 1 Mar 2024 04:56:46 +0100 Subject: [PATCH] first try for CI/CD --- .github/workflows/deploy.yml | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 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..4ac9be4 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,43 @@ +name: Deploy + +on: + push: + branches: + - master + +concurrency: + group: master + cancel-in-progress: true + +jobs: + flake: + name: flake + uses: ./.github/workflows/flake.yml + django: + name: django + uses: ./.github/workflows/django.yml + deploy: + name: Deploy + needs: [ flake, django ] + runs-on: ubuntu-latest + steps: + - name: Configure SSH + env: + SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} + SSH_HOST: ${{ secrets.SSH_HOST }} + SSH_USER: ${{ secrets.SSH_USER }} + run: | + kdir -p ~/.ssh/ + echo "$SSH_PRIVATE_KEY" > ~/.ssh/github + chmod 600 ~/.ssh/github + cat >>~/.ssh/config <