From 8412d11425ab7bf5b6da138b02f7d2ca6d501050 Mon Sep 17 00:00:00 2001 From: Dylan Hillerbrand Date: Wed, 31 Jul 2024 17:56:21 -0400 Subject: [PATCH] feat(cicd): remove staging deployment action --- .github/workflows/cd_stage.yml | 36 ---------------------------------- 1 file changed, 36 deletions(-) delete mode 100644 .github/workflows/cd_stage.yml diff --git a/.github/workflows/cd_stage.yml b/.github/workflows/cd_stage.yml deleted file mode 100644 index 8c463047..00000000 --- a/.github/workflows/cd_stage.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Deploy to staging Server -on: - push: - branches: - - "main" - -concurrency: - group: staging - cancel-in-progress: true - -jobs: - deploy-staging: - runs-on: ubuntu-latest - steps: - - name: Checkout to source code - uses: actions/checkout@v3 - - name: Install SSH Key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.KEY }} - known_hosts: ${{ secrets.KNOWN_HOSTS }} - - name: Stop docker swarm and cleanup services - run: | - ssh -J ${{ secrets.PROXY_USERNAME }}@${{ secrets.PROXY_HOST1 }},${{ secrets.PROXY_USERNAME }}@${{ secrets.PROXY_HOST2 }} ${{ secrets.USERNAME }}@${{ secrets.HOST }} "cd /cantus-ultimus && sudo docker compose stop" - - name: Log git branch we're on - run: | - ssh -J ${{ secrets.PROXY_USERNAME }}@${{ secrets.PROXY_HOST1 }},${{ secrets.PROXY_USERNAME }}@${{ secrets.PROXY_HOST2 }} ${{ secrets.USERNAME }}@${{ secrets.HOST }} "cd /cantus-ultimus && sudo git branch --all -v" - - name: Fetch on dev branch - run: | - ssh -J ${{ secrets.PROXY_USERNAME }}@${{ secrets.PROXY_HOST1 }},${{ secrets.PROXY_USERNAME }}@${{ secrets.PROXY_HOST2 }} ${{ secrets.USERNAME }}@${{ secrets.HOST }} "cd /cantus-ultimus && sudo git fetch origin main && sudo git merge origin/main" - - name: Build docker images - run: | - ssh -J ${{ secrets.PROXY_USERNAME }}@${{ secrets.PROXY_HOST1 }},${{ secrets.PROXY_USERNAME }}@${{ secrets.PROXY_HOST2 }} ${{ secrets.USERNAME }}@${{ secrets.HOST }} "cd /cantus-ultimus && sudo docker compose build" - - name: Start the service - run: | - ssh -J ${{ secrets.PROXY_USERNAME }}@${{ secrets.PROXY_HOST1 }},${{ secrets.PROXY_USERNAME }}@${{ secrets.PROXY_HOST2 }} ${{ secrets.USERNAME }}@${{ secrets.HOST }} "cd /cantus-ultimus && sudo docker compose up -d" \ No newline at end of file