release: if: github.event_name != 'pull_request' needs: [build-frontend, build-backend] runs-on: ubuntu-latest environment: Morska steps: - uses: https://github.com/actions/checkout@v4 - name: Download frontend artifacts uses: https://github.com/actions/download-artifact@v3 with: name: frontend path: ./release/frontend - name: Download backend artifacts uses: https://github.com/actions/download-artifact@v3 with: name: webapi path: ./release/webapi - name: Archive frontend run: (cd release/frontend && zip -r ../DiunaBI-Morska-Frontend.zip .) - name: Archive backend run: (cd release/webapi && zip -r ../DiunaBI-Morska-WebApi.zip .) - name: Prepare known_hosts run: | mkdir -p ~/.ssh ssh-keyscan -H "${{ vars.DEPLOY_HOST }}" >> ~/.ssh/known_hosts 2>/dev/null || true - name: Upload artifacts via SCP run: | scp -i /ci-keys/prod_deploy -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes \ ./release/DiunaBI-Morska-Frontend.zip \ "${{ vars.DEPLOY_USER }}@${{ vars.DEPLOY_HOST }}:${{ vars.DEPLOY_PATH }}" scp -i /ci-keys/prod_deploy -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes \ ./release/DiunaBI-Morska-WebApi.zip \ "${{ vars.DEPLOY_USER }}@${{ vars.DEPLOY_HOST }}:${{ vars.DEPLOY_PATH }}"