Skip to content

Commit

Permalink
ci: add deploy on Render
Browse files Browse the repository at this point in the history
  • Loading branch information
conganhhcmus committed Mar 23, 2024
1 parent bfd61e8 commit 064296f
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions .github/workflows/ci.yml → .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -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]
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 064296f

Please sign in to comment.