diff --git a/.github/workflows/ci.yml b/.github/workflows/ci-cd.yml similarity index 81% rename from .github/workflows/ci.yml rename to .github/workflows/ci-cd.yml index 7fbc828..768aca8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci-cd.yml @@ -1,7 +1,5 @@ -name: Lint & Deployment -env: - VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} - VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} +name: Check, Build & Deployment + on: push: branches: [master] @@ -41,11 +39,24 @@ jobs: - if: github.event_name == 'pull_request' run: echo "${{ github.event.pull_request.title }}" | yarn commitlint + deploy-on-render: + name: Deploy Render + environment: Production + if: github.ref == 'refs/heads/master' + needs: [check] + runs-on: ubuntu-latest + steps: + - name: Deploy to Render + uses: johnbeynon/render-deploy-action@v0.0.8 + with: + service-id: ${{ secrets.RENDER_SERVICE_ID }} + api-key: ${{ secrets.RENDER_API_KEY }} + wait-for-success: true + build: name: Build needs: [check] runs-on: ubuntu-latest - environment: production steps: - uses: actions/checkout@v4 - name: Use Node.js 20.x @@ -74,8 +85,12 @@ jobs: overwrite: true retention-days: 7 - deploy: - name: Deploy + deploy-on-vercel: + name: Deploy Vercel + env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} + environment: Production-BK if: github.ref == 'refs/heads/master' needs: [build] runs-on: ubuntu-latest